问题
I am developing a system app in which I need to capture the outgoing call answer/reject events. Could you advice on how to achieve this in a rooted device please ? Problem with TelephonyManager class is that there is no notification of when outgoing call has answered. This is crucial to my app. My target device is android 4.4(kitkat).
Some thing like this app. https://play.google.com/store/apps/details?id=io.github.yutouji0917.callvibrator.ad
回答1:
To do this you must register broadcast receiver for listening phone events like incoming, outgoing call, hang up events and don't forget to define broadcast in manifest file.
Here i am attaching a link that will help you to implement your code http://karanbalkar.com/2014/02/detect-incoming-call-and-call-hangup-event-in-android/
http://www.codeproject.com/Articles/548416/Detecting-incoming-and-outgoing-phone-calls-on-And
来源:https://stackoverflow.com/questions/34586207/in-rooted-device-detect-if-an-outgoing-call-has-been-answered