如何发现另一个应用程序的意图 [英] How to discover another app's intent
问题描述
我想建立一个应用从应用程序的StumbleUpon股份收。
我可以,在这一点上,接受浏览器的共享网址,但是从StumbleUpon公司分享时,我的应用程序不会在列表中显示出来。
I'm trying to build an app to receive shares from the StumbleUpon app. I can, at this point, receive the browser's "share url", but when sharing from StumbleUpon my app does not show up on the list.
我在想,我可能没有登记清单中的正确意图。
有什么办法来查找该应用程序是干什么的?
I'm thinking that I may not have registered the correct Intents in the manifest. Is there any way to find what that app is doing?
感谢。
推荐答案
您可以得到一点关于从logcat的意图的信息。当我的StumbleUpon分享我在日志中注意到了这一点:
You can get a bit of information about intents from logcat. When I shared in StumbleUpon I noticed this in the log:
12-08 19:01:18.915: I/ActivityManager(139): Starting activity: Intent { act=android.intent.action.SEND typ=text/plain flg=0x3000000 cmp=com.google.android.gm/.ComposeActivityGmail (has extras) } from pid 4213
从这一点,我是能够得到一个应用程序与下面的过滤器的StumbleUpon股份列表中显示:
From that, I was able to get an app to show up in the StumbleUpon share list with the following filter:
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain"/>
</intent-filter>
这篇关于如何发现另一个应用程序的意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!