Force app to update when new version of app is available in android play store

Neerav Shah picture Neerav Shah · Apr 11, 2015 · Viewed 17.1k times · Source

I had an app on the playstore. Know what I want is when new update is available on playstore the user should get a popup to update the app when he try to use the app. And if he does not update the app it should close the app. Ex: I want to force the user to update the app to continue using.

Answer

Jeffy Lazar picture Jeffy Lazar · Apr 11, 2015

As far as I know Google Play doesn't provide with any kind of API for this, so you would have to manually check.

But I can tell you a method to force user to update with the latest release.

  1. One way is by sending a push notification to the user, and when you receive the notification you redirect user to the playstore.

  2. Second Method is longer but this is a proper sure method. You make a webservice on a server, which stores the latest version of the app. whenever your apps runs,

    • on MainActivity you make a post a request to the webservice and check if the version in the app is latest or not
    • If it is not the latest version, on the response of the webservice you can redirect user to the playstore