问题
I would like to start with the package name (or google play store URL) of an existing Android app (e.g., https://play.google.com/store/apps/details?id=com.google.android.gm), and programmatically obtain the list of permissions it asks for.
Before I go using JSoup on the HTML code on the "Permissions" tab on the above URL, I wanted to know if a cleaner way exists. Is there, for example, a JSON API for this?
回答1:
There is no official API for Google Play that does what you're looking for.
You might, however, be able to use this unofficial API, although it does seems to have been abandoned:
http://code.google.com/p/android-market-api/
I think your best option is possibly to fetch the source code, parse it and pray that it doesn't break.
回答2:
No easy way currently exists. See here for a longer discussion on this issue (older but still relevant): https://android.stackexchange.com/questions/20619/how-to-search-the-play-store-by-permissions/69964#69964
来源:https://stackoverflow.com/questions/12618186/how-to-programmatically-get-the-list-of-permissions-of-an-android-app-from-play