I'm trying to catch an Android Market search intent.
That's the way you launch Android Market and search for an app by package name:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:com.google.somepackage")));
Now, here's the intent filter for one of my activities:
<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>
I'd expect Android to ask me which app should handle the intent which doesn't happen.
Yet, if I replace market
with market1
or search
with search1
, in both places, my activity gets launched.
Is there a notion of "untouchable" intents or something?
TIA.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…