链接到预订设备市场 [英] Link to book in device marketplace
问题描述
任何人知道如何创建一个Android应用程序链接到一本关于谷歌播放?
Anybody knows how to create a link in an Android app to a book on Google Play?
我知道,对于应用程序的格式为:
I know that for apps has this format:
http://market.android.com/details?id=com.google.earth
但我没有找到的书籍答案。在此先感谢
But I'm not finding the answer for books. Thanks in advance
更新:例如code
我使用基于@Pedro奥利维拉回答以下网址了解
I'm know using following URL based on @Pedro Oliveira answer
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://books.google.com/ebooks?id=2NYlAgAAQBAJ"));
getActivity().startActivity(intent);
知道了,Android首次提示我选择一个应用程序来打开URL。它显示我的只有浏览器的应用程序(如铬)。
然后,当浏览器打开的网址,Android的再次提示我重新选择一个应用程序来完成动作,但这个时候的名单包括Play商店中的应用程序。
知道,如果我点击应用它打开罚款。
Know, android first prompt me to select an app to open the url. It shows me only browser apps (ie chrome). Then, when browser opens the url, android prompt me again to select again an app to complete the action, but this times the list includes PlayStore app. Know, if I click the app it opens fine.
我做错了什么?我需要另一个动作传递给我的意图是什么?
I am doing something wrong?, I need to pass another action to my Intent?
推荐答案
更改为你想要的ID的ID。希望这有助于。
Change the id for what id you want. Hope this helps.
http://books.google.com/ebooks?id=2Zc3AAAAYAAJ
或
https://play.google.com/store/books/details? ID = 2NYlAgAAQBAJ
这篇关于链接到预订设备市场的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!