问题
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