Reputation: 2218
Introduction
I've deployed the first version of my app to the Play Store and now I'm going to change the version code and publish the next version. So, in general case, the Google Play will notify users about the update. But I want my app itself to check for the updates and take user to the Play Store.
Studies till now
I have read about the workaround , here , where the app checks for the latest version with your server but I don't want that.
Requirement
I just want my app itself to directly compare its version with version available on the Play Store, and if it is different, then prompt user to update the app. On confirmation, it will take the user to the Play Store.
Is there any way to achieve this?
Upvotes: 2
Views: 151
Reputation: 5841
Short answer: No. There is no such official API yet. But you can go for an unofficial one.
But still as you have mentioned you can go for your own API implementation and prompt the user to update the app. But take into consideration that users have their own preferences about updating the app and they may find such prompts annoying. @Tim Castelijns's answer explains it in detail.
Upvotes: 0
Reputation: 3831
You will need a service call to
https://androidquery.appspot.com/api/market?app=YourPackageNameOnPlaystore
for example:
https://androidquery.appspot.com/api/market?app=com.google.android.youtube
the respnse which will be returned by playstore will contain version information which is present on playstore.
compare it with local app version and take further steps
Hope this helps!
Good luck!
Upvotes: 0
Reputation: 43304
Is there any way to achieve this?
Probably, but I would not try to implement this if I were you and here is why.
Users configure update settings themselves through google play app settings.
If they want app updates right way they can say so. If they want to confirm first they can say so. If they don't want to be notified of updates at all, they can say so.
In most cases users are already notified of an update of your app through google play notifications. There is no need to add a 2nd notification. Even worse - users that don't want to be notified of updates will be annoyed when you notify them yourself. You want to avoid that.
Upvotes: 1