一旦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
?