Detect if an outgoing call has been answered

这一生的挚爱 提交于 2019-11-26 12:20:26
rbd

I don't think there's such API and also there's no API for sending DTMFs due to the same reason that you can't tell when the call is being connected.

It does not necessarily needs to be possible to capture this as an outside app. The green android icon is a part of the application that controls the call, so it does not need a broadcast to change the icon.

As far as android's telephony manager is concerned u cannot detect programmatically whether the call has been answered or not. This is to say that u do not have the option to know when the user picked the phone at other end. Android has got 3 states of telephony manager and none of them are capable of detecting whether the call was actually answerd or not(IN CASE OF OUTGOING CALLS)

The only way you may be able to do this is by parsing the Logcat logs, no PhoneStateListener event is available for that.

Some are asking for it here: https://code.google.com/p/android/issues/detail?id=14266

Anyway, in versions above Android 4.2 as Logcat is "sandboxed" it may be impossible...

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