Reputation: 3288
what is the way to get app rating and user reviews of an app on Google Play, if I have it´s Id?
Upvotes: 0
Views: 1040
Reputation: 313
Since there is no official API, here is the quick and dirty way:
Use HttpClient to get the requested page, i.e. "https://play.google.com/store/apps/details?id=com.poncho.yapm".
View the page source and learn how to parse the page and get what you want from the response. For example, for rating:
The major drawback: if Google change the page layout you will need to change your implementation. However, this often happen also when you use formal API.
If this is a real application, running a daily test that verifies your code would save you time and customers.
Hope this helps, Yaron
Upvotes: 1
Reputation: 27748
There is an Open Source application titled Andlytics available on the Google Play store. It is updated frequently enough, but mostly yo accommodate any changes that might be made to the Google Play store's back-end.
I am not sure if it can be coded to bring in details specific to a particular application. At the moment, how it works is, a user must log in with a valid Developer Account. Then authorize it to access your Google account. And once done, it then gets all applications on the developers account. Not a specific account.
This, however, I think (I think because I have never had the opportunity of actually using the source) can be modified to accommodate your specific requirements.
You can get the entire Source Code here.
You can also try the link mentioned in Stefan's post. Though a cursory look suggests that it has not been updated after the first quarter of 2012. But if you can bring the code up to speed, that could work too.
Since I am linking to an app on Google Play as also it's source code, for the sake of clarity, I have nothing to do with Andlytics, the project or the app.
Upvotes: 0
Reputation: 6319
You don't really have any means for this in Android.
There are some libraries however, that give you some options to check info from Google play. Not sure if they're actually updated since the time it was actually Market place and if any breaking changes were made since then.
You could try these;
https://code.google.com/p/android-market-api/
https://code.google.com/p/android-query/wiki/Service
Upvotes: 1