In rooted device detect if an outgoing call has been answered

核能气质少年 提交于 2020-01-07 03:41:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!