Dante May Code
Dante May Code

Reputation: 11247

Is there a way to direct the user to the market for another app?

I want to direct the user from one app the user is currently running, to the market, to download another app.

Upvotes: 0

Views: 210

Answers (2)

Nanne
Nanne

Reputation: 64429

The link to the market is: market://search?q=pname:your.package.name

use this in your code:

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

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

Upvotes: 1

mudit
mudit

Reputation: 25534

Yes. Try this:

Intent intent = new Intent(Intent.ACTION_VIEW,
    Uri.parse("https://market.android.com/details?id=com.hg.cyberlords")); 

c.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
c.startActivity(intent); 

This will open the market app with "Cyberlords" app.

Upvotes: 1

Related Questions