[英]How to capture intent (with action “android.intent.action.VIEW”) programatically
I am getting following log while previewing a Gmail attachment. 预览Gmail附件时出现跟踪日志。 I want to receive(sniff) this intent(with action
android.intent.action.VIEW
) programatically. 我想以编程方式接收(嗅探)此意图(使用动作
android.intent.action.VIEW
)。 I have created intent filter with android.intent.action.VIEW
action and I have registered this filter with a broadcast receiver. 我已使用
android.intent.action.VIEW
操作创建了意图过滤器,并已在广播接收器中注册了该过滤器。 Still, I am not able to receive broadcasted intent. 不过,我仍然无法收到广播的意图。
How can I achieve it programatically? 如何以编程方式实现它? Help highly appreciated.
高度赞赏。
LogCat:
12-07 18:21:50.528: I/ActivityManager(96): Starting: Intent { dat=content://gmail-ls/messages/hawkagent%40interfaceinfosoft.com/35/attachments/0.1/BEST/false cmp=com.google.android.gm/.ViewAttachmentActivity } from pid 8309
12-07 18:21:52.598: I/ActivityManager(96): Starting: Intent { act=android.intent.action.VIEW dat=content://gmail-ls/messages/hawkagent%40interfaceinfosoft.com/35/attachments/0.1/BEST/false typ=text/plain flg=0x80001 cmp=android/com.android.internal.app.ResolverActivity } from pid 8309
Did you register your Receiver in the AndroidManifest.xml: 您是否在AndroidManifest.xml中注册了Receiver:
<receiver android:name="MyReceiver" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</receiver>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.