Link to book in device marketplace

一曲冷凌霜 提交于 2019-12-11 17:27:07

问题


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

Update: Example code

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);

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?


回答1:


Change the id for what id you want. Hope this helps.

http://books.google.com/ebooks?id=2Zc3AAAAYAAJ

or

https://play.google.com/store/books/details?id=2NYlAgAAQBAJ



来源:https://stackoverflow.com/questions/25810028/link-to-book-in-device-marketplace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!