Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

market:// not supported, despite Android documentation

I'm implementing in-app purchase for an Android app from within a web view. The purchase is meant to be completed via Amazon's MP3 app. If the user does not have it installed, I want to open the Market app so they can download it before attempting to complete their purchase.

According to the official Android documentation, the following JavaScript should work:

window.location.href = 'market://details?id=com.amazon.mp3';

However, when I call that, I get a view that is blank except for a link to that link and half an upside-down Android dude poking out the top left of the view (you can't make this stuff up).

Anyone know why this might not be working? I've tested it on multiple handsets all running Android 2.1 and above. TIA for any help!

UPDATE: Thanks to @jtkendall on Twitter for this post that talks about how this behavior changed recently. Looks like this has to be implemented in native code.

like image 769
Andrew Hedges Avatar asked Mar 21 '11 18:03

Andrew Hedges


1 Answers

Use the Http variant.

http://market.android.com/details?id=com.amazon.mp3

http://market.android.com/details?id=

like image 144
Jeremy Edwards Avatar answered Sep 19 '22 21:09

Jeremy Edwards