开发者

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 lin开发者_运维百科k 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.


Use the Http variant.

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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜