Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the URI format<package_name> described in Linking to Your Apps on Google Play in order to open the app in Android Market or Google Play to install it. But it only opens it in the browser as it would do it on the desktop. And when Install is clicked it asks the user to sign-in to install.

How can I link the app in Google Play so the user can install it?

share|improve this question
This is weird, since on my device the browser straight up refuses to open Market links and opens the Market app. I would go to Settings -> Applications -> Manage applications and clear the defaults for the browser to ensure that isn't causing the problem. If that doesn't work: What device do you have? Have you tried typing the URL directly into the browser and seeing what happens? Where is this link appearing, exactly? (On a web page or in another app?) – Matthew Read Apr 23 '12 at 22:46
@MatthewRead I've tried to used the link from a message, QR code, email,... And same thing. Also, I've tried on different android devices, not just one, and same issue. – slybloty Apr 23 '12 at 23:26
Try replacing http with https. It may look dumb, but try it. – Evil Angel Apr 24 '12 at 13:25
@SachinShekhar I used both http and https. Even market. And the same result. – slybloty Apr 24 '12 at 13:37
What's your web browser? Default Android browser and Dolphin HD automatically redirect to Play Store app (or, atleast ask)... – Evil Angel Apr 24 '12 at 13:43
up vote 8 down vote accepted

Try directly this if link is originated from an app for Android to handle:


Note: There's no domain and host.

share|improve this answer
Interesting that this way works. It directs to the market place properly. Thanks. – slybloty Apr 24 '12 at 14:36
This'll only work on the Android device. Trying this in a desktop browser won't work. – Al E. Apr 24 '12 at 15:20
@AlEverett Unless there's a market protocol handler in desktop browser to insert domain and host. :) – Evil Angel Apr 24 '12 at 15:24
In fact, it doesn't work even in Android web browsers. Its intended to use in app development. – Evil Angel Apr 24 '12 at 15:26
Then if this is an app development question it's in the wrong place. – Al E. Apr 24 '12 at 15:30

I'm using the code below and it is working fine with my phone and emulator.

For the phone with Google Play app, it will automatically open the app. For the emulator (without Google Play app), it will automatically open the browser.

try { 
  Intent intent = new Intent(Intent.ACTION_VIEW);
} catch (Exception e) { //google play app is not installed
  Intent intent = new Intent(Intent.ACTION_VIEW);
share|improve this answer
+1 for try/catch. In fact sometimes if there is no Google Play app installed on device, we'll get crash when try to open an app with URL starts with "market://details?id=" – anticafe Jan 4 '13 at 8:24

First off, the user can actually install the app from the market. He just can't do it directly but only make Google remote-install the app via the website, as he would do if he browsed the market on his PC.

Second, what browser are you testing this with? Opera isn't well integrated into Android and won't open Play URLs in the app. In fact I'm not sure even the native browser will.

Maybe you should just use market:// links instead of http://links.

share|improve this answer
It's the android browser it opens with instead of the app. The link is accessed from the device. I want the user to be able to install the app by clicking the link and be directed to Market or Google Play. – slybloty Apr 23 '12 at 22:37

Settings > Applications > All (top tab)
Click Menu button > Reset app preferences


share|improve this answer

I found simple and easy solution.

  1. make a html page any where. <meta http-equiv="REFRESH" content="0; URL=market://details?id=package_name" />
  2. Open browser and type this html URL
  3. you will see your app in play market app
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.