Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Special url to open Marketplace to a specific app?

Is there a url format available such that clicking on the url will open the Android (Gphone) Marketplace to a particular app's page for installation?

Does it work with the 'current' Android OS ver in the wild?

Eg, can I put something on my customized Android website better than

  1. Please open the Marketplace application,
  2. search for FBReader
  3. then install it

The app that I want to point people to is the epub reader, FBReader http://www.fbreader.org/FBReaderJ/

like image 273
Larry K Avatar asked Oct 13 '09 22:10

Larry K


2 Answers

Based on the info here: http://developer.android.com/distribute/googleplay/promote/linking.html

It looks like you're looking for this:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.example.android"));
startActivity(intent);

Where the id= is followed by the package name of the app you wish to link to directly in the store.

To find out the package name, download and install the app on your device, then run

adb shell

and use the command:

pm list packages -f

that will list everything you have installed on the device, you should be able to find the app you are looking for pretty easily.

like image 92
Yevgeny Simkin Avatar answered Oct 07 '22 18:10

Yevgeny Simkin


This should work as a standard HTML anchor tag:

https://market.android.com/search?q=pname:com.google.earth

thus, for the "pname" parameter, you (Larry K) would likely use:

https://market.android.com/search?q=pname: [ org (dot) geometerplus (dot) zlibrary (dot) ui (dot) android ]

...similar to:

market://search?q=pname:com.google.earth

Yes?

like image 32
No Emails Avatar answered Oct 07 '22 20:10

No Emails