Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Catching market search intents?

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.

like image 341
yanchenko Avatar asked Jan 07 '10 21:01

yanchenko


People also ask

What is search intent marketing?

Search Intent (also known as “User Intent”) is the main goal a user has when typing a query into a search engine. Common types of Search Intent include informational, commercial, navigational and transactional.

How do I track search intent?

Another way to determine search intent is to research the SERPs. Type in the keyword you're targeting into the search bar and see what Google comes up with. You'll likely be able to tell by the types of results what Google deems the most relevant search intent for each term.

What is user search intent in SEO?

The user intent, or search intent states which goal or intention an internet user has when entering a search term into a search engine. User intent is now a central factor in content and search engine optimization and is eclipsing individual keywords as a dominant ranking factor.


1 Answers

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...

like image 192
Christopher Orr Avatar answered Sep 20 '22 13:09

Christopher Orr