How to link to Android Market app
Asked Answered
T

5

29

What's the best way to link to an Android Market app without knowing who will get the link (Android user/non-Android user) and from where (desktop/mobile)?

For iPhone I use the itunes.apple.com app links. They show a complete description of the app, and if you have iTunes installed, either on the desktop or on your mobile, it allows you to download the app directly. Example: http://itunes.apple.com/us/app/ibooks/id364709193?mt=8

For Android I currently use a third-party Android Market web browser (see answer below), but I was wondering if there was a better alternative, and hoping to learn from others who have dealt with this issue.

Teodoro answered 13/7, 2010 at 16:56 Comment(2)
Just check this link: developer.android.com/guide/publishing/… , overthere everything is given with full description with example.Ultracentrifuge
developer.android.com/distribute/tools/promote/linking.htmlHandfast
E
23

I was looking into this yesterday, and what a coincidence: the new Android Market** was just released today!

  • Going to https://play.google.com/store/apps/details?id=com.google.earth from your desktop computer now shows a full page about the selected app, with screenshots, reviews etc. You can even install the app on your phone remotely!

  • Opening the same URL from a mobile phone will prompt you if you want to view the website or go straight to the Google play app.

I'm guessing this will now be the preferred method to link to an app.

** Currently called Google Play

Endoplasm answered 2/2, 2011 at 21:29 Comment(0)
C
59

I think this will help you: http://d.android.com/guide/publishing/publishing.html#marketintent

Currently, the Android Market does not have a web interface, or a desktop client. Basically, you have two types of URIs you can use:

  1. market://details?id=com.google.earth
  2. http://market.android.com/details?id=com.google.earth

Both options will open up the Android Market if clicked from an Android device (that has the Market installed). Details about each one:

  1. This one is only understood by Android devices with the Market installed. The Market is opened immediately. This is best embedded into QR codes that can be read with any Android device with a camera. You can show these QR codes on your website or wherever. Check out http://qrcode.kaywa.com/ for a nice QR code generator (you can even hotlink to them)
  2. This one is understood by any device (since it's http://), but opening it up in a browser gives a 404 Not Found error (because, as I said, there's no web interface for the Market, yet). However, it is possible that Google will, at some point, make a web interface for the Market and keep this link structure. If you click on such a link with an Android device, you will get a "Complete this action with..." dialog, giving you a choice between the Browser and Android Market.

Quote from the link at the beginning (emphasis mine):

Note that these URIs work only when passed as Intent data — you can't currently load the URIs in a web browser, either on a desktop machine or on the device.

Make sure to give it a read, it's a good resource.

Edit: in the meantime (i.e. until Google makes an interface for the Android Market), it's perfectly fine to use services such as Crycket and I've seen a lot of people do it.

Conciliar answered 13/7, 2010 at 17:10 Comment(5)
+1 for a very detailed answer. However, the 404 error makes this solution unusable for me, at least until Google decides to give the Market a web interface.Teodoro
@hgpc Then continue using Crycket (or similar services).Conciliar
I was pleased to discover that market://details?id=... URLs are automatically sent to your phone if you have FoxToPhone/ChromeToPhone installed.Rosary
I guess the "at some point" in part 2 of your answer has come now - following that link in a browser shows a good description of the app, but goes directly to the market if visited on an Android phone. Yay! :DStretcher
market.android.com/details?id=com.google.earth redirects to market on android and to google play on non-android platform.Emanuel
E
23

I was looking into this yesterday, and what a coincidence: the new Android Market** was just released today!

  • Going to https://play.google.com/store/apps/details?id=com.google.earth from your desktop computer now shows a full page about the selected app, with screenshots, reviews etc. You can even install the app on your phone remotely!

  • Opening the same URL from a mobile phone will prompt you if you want to view the website or go straight to the Google play app.

I'm guessing this will now be the preferred method to link to an app.

** Currently called Google Play

Endoplasm answered 2/2, 2011 at 21:29 Comment(0)
U
2

The new format for making sure urls to apps open in Google Play is for example market://details?id=com.adobe.reader of course you'll need to look at the url in a browser to get the "com.?.?" part of the url.

Unpredictable answered 6/5, 2012 at 20:42 Comment(0)
C
2

market://details?id=com.your.app.id instead of http://play.google.com/store/apps/details?id=com.your.app.id will do the thing automatically.

Cammack answered 23/5, 2014 at 20:42 Comment(0)
B
1

Here is what I'm using in my web pages. It is based on JavaScript and jQuery. The idea is to search for 'android' sub-string inside browser's UserAgent and if that is the case - replace HTTP URI part with Android Market URI part, inside all links:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
  updateAndroidMarketLinks();
  // some more core here ... 

  function updateAndroidMarketLinks()
  {
    var ua = navigator.userAgent.toLowerCase();
    if (0 <= ua.indexOf("android")) {
      // we have android
      $("a[href^='http://market.android.com/']").each(function() {
        this.href = this.href.replace(/^http:\/\/market\.android\.com\//,
          "market://");
      });
    }
  }
});
</script>
</head>

<body>
<a href="http://market.android.com/details?id=com.google.earth" target="_blank">Download for Android</a>
</body>

</html>
Barathea answered 25/8, 2011 at 12:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.