Catching market search intents?

后端 未结 1 447
余生分开走
余生分开走 2020-12-15 01:20

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(         


        
相关标签:
1条回答
  • 2020-12-15 02:10

    That is odd indeed, and kinda goes against the whole open intent system. I know there are broadcasts that only the system can create, but I hadn't heard of such a thing for intent resolution.

    Anyway, I just dumped the Market APK on my HTC Hero and checked the manifest. They're being slightly more specific in their URI-matching by adding the path:

    <intent-filter android:priority="100">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="http" 
              android:host="market.android.com" android:path="/search" />
        <data android:scheme="market"
              android:host="search" android:path="" />
    </intent-filter>
    

    However, I tried adding this to my app, except I increased the priority value (not that I've seen that have any effect before), yet still I couldn't capture the Intent.

    Hopefully someone (or the AOSP) can shed some light on the situation...

    0 讨论(0)
提交回复
热议问题