简体   繁体   English

如何以编程方式捕获意图(使用动作“ android.intent.action.VIEW”)

[英]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.

相关问题 找不到用于处理意图的活动{act = android.intent.action.View} - No activity found to handle intent { act=android.intent.action.View } 未找到处理 Intent 的活动:android.intent.action.VIEW - No Activity found to handle Intent : android.intent.action.VIEW 无法启动服务意图{act = android.intent.action.VIEW…} - Unable to start service Intent { act=android.intent.action.VIEW… } 启动android.intent.action.VIEW时出现ActivityNotFoundException - ActivityNotFoundException when starting android.intent.action.VIEW 使用android.intent.action.VIEW打开另一个应用程序 - Open Another App with android.intent.action.VIEW Expo IntentLauncher.startActivityAsync 与 android.intent.action.VIEW - Expo IntentLauncher.startActivityAsync with android.intent.action.VIEW Android - 找不到处理Intent的活动{act = android.intent.action.VIEW - 试图打开PDF文件 - Android - No Activity found to handle Intent { act=android.intent.action.VIEW - Trying to open a PDF File android.content.ActivityNotFoundException:找不到用于处理Intent的活动{act = android.intent.action.VIEW dat = content:// - android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=content:// android.content.ActivityNotFoundException:未找到任何处理Intent的活动{act = android.intent.action.VIEW - android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW android.content.ActivityNotFoundException:没有找到处理意图的活动{act=android.intent.action.VIEW dat=PendingIntent{} - android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=PendingIntent{ }
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM