6
我一直在挖掘一段时间到Android的Contacts app来源找出哪些活动处理Intent.ACTION_CALL_PRIVILEGED
。不幸的是,我找不到它的源代码。有人知道它是如何称呼的,或者甚至更好,我可以找到它的来源?谢谢!哪个活动处理Intent.ACTION_CALL_PRIVILEGED?
我一直在挖掘一段时间到Android的Contacts app来源找出哪些活动处理Intent.ACTION_CALL_PRIVILEGED
。不幸的是,我找不到它的源代码。有人知道它是如何称呼的,或者甚至更好,我可以找到它的来源?谢谢!哪个活动处理Intent.ACTION_CALL_PRIVILEGED?
奇怪的是,Phone application处理呼叫相关的事件。 ;)
您可以在logcat中观看ActivityManager
输出,以查看哪个组件处理特定的Intent
。
在联系人源代码:
Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
Uri.fromParts("tel", number, null));
startActivity(intent);
可以在命令行上重现此Intent
:
adb -e shell am start -a android.intent.action.CALL_PRIVILEGED -d tel:12345
这导致下述(很好格式)logcat的输出:
Starting activity: Intent { act=android.intent.action.CALL_PRIVILEGED dat=tel:12345 flg=0x10000000 cmp=com.android.phone/.PrivilegedOutgoingCallBroadcaster }
这说明你应用程序的这个com.android.phone
dles这个特别的Intent
。
呵呵不错!看起来我之后叫做OutgoingCallBroadcaster。 :) – mobilekid 2010-02-19 15:10:11
很好的答案,谢谢! – mobilekid 2010-02-19 17:38:04
你能告诉我你在哪个SDK版本中找到Intent.ACTION_CALL_PRIVILEGED?我找不到它,即使语法不显示它。只能看到Intent.ACTION_CALL(sdk 2.1)。谢谢 – 2010-08-11 09:57:57