6
我正试图抓住Android电子市场的搜索意图。捕捉市场搜索意图?
这是你推出Android市场,并通过包名称搜索应用程序的方式:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:com.google.somepackage")));
现在,这里是我的活动之一的意图过滤器:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="market" android:host="search" />
</intent-filter>
我期望Android问我哪个应用程序应该处理不发生的意图。
但是,如果我用market1
或search
替换market
与search1
,在这两个地方,我的活动都会启动。
有没有“不可触摸”的意图或什么的概念?
TIA。
通过设置优先级这样的,没有第三方应用程序可以拦截意图。只有安装在系统分区中的应用才能被授予大于0的优先级。 – hackbod 2010-01-07 23:35:32
啊哈!非常感谢这些信息。 – 2010-01-07 23:51:35
@hackbod会很好,如果可以添加到文档http://developer.android.com/guide/topics/manifest/intent-filter-element.html#priority – 2010-01-08 01:02:49