Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to redirect user to a particular app in Market?

Tags:

android

My Android app is trying to urge a user to upgrade a particular app from the Market. I can detect the old version of the app but how do I redirect user to the app page in Market directly with a button click?

like image 219
Teo Choong Ping Avatar asked Jan 15 '11 10:01

Teo Choong Ping


2 Answers

You need to raise a specially formed intent, like this:

Uri marketUri = Uri.parse("market://details?id=" + packageName);
Intent marketIntent = new Intent(Intent.ACTION_VIEW, marketUri);
startActivity(marketIntent);

Where packageName would be package name of your target app.

like image 95
Konstantin Burov Avatar answered Nov 13 '22 04:11

Konstantin Burov


I think you can link to it directly with a link like so: http://market.android.com/search?q=pname:com.voxmobili.phonebook (but with a working app link that is :))

like image 30
Stefan H Singer Avatar answered Nov 13 '22 06:11

Stefan H Singer