Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
572 views
in Technique[技术] by (71.8m points)

hyperlink - How to link to Android Market app

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...