KDEx
KDEx

Reputation: 3657

Accurate market search via intent

I have a button that when clicked will search the market for an app. I have two examples. In the first example the user is brought to a search result page in the market app. In the second example the user is brought to the correct page but the browser is used. How can I change this code to bring me to my intended results?

Let me provide code (nevermind that the app names are different):

Example A:

   Intent i = new Intent(Intent.ACTION_VIEW);
   i.setData(Uri.parse("market://search?q=com.amazon.kindle"));
   startActivity(i);

Results of Example A:

enter image description here

Example B:

  Intent i = new Intent(Intent.ACTION_VIEW);
  i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.netflix.mediaclient"));
  startActivity(i);

Results of Example B:

enter image description here

Intended results:

enter image description here

Upvotes: 0

Views: 935

Answers (1)

Ferdau
Ferdau

Reputation: 1558

market://details?id=com.amazon.kindle

More info: http://developer.android.com/guide/publishing/publishing.html#marketintent

Upvotes: 2

Related Questions