一旦广播了
更新:我查看了处理外拨电话的 Android 应用程序的源代码。 我注意到
ACTION_NEW_OUTGOING_CALL
,我需要捕获对方接听电话的事件。 请问如何实现?我知道这是可能的,因为 Android 拨号应用程序在被叫方接听电话时会将绿色 Android 图标更改为该人的照片。更新:我查看了处理外拨电话的 Android 应用程序的源代码。 我注意到
ContactsUtils
中有以下方法:/**
* Kick off an intent to initiate a call.
*/
public static void initiateCall(Context context, CharSequence
phoneNumber) {
Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
Uri.fromParts("tel", phoneNumber.toString(), null));
context.startActivity(intent); }
我猜我的答案就在监听Intent.ACTION_CALL_PRIVILEGED
的活动中。那么,重新表达我的问题:有人知道哪个活动处理Intent.ACTION_CALL_PRIVILEGED
吗?