Play Store Not Showing Update

Viewed 353

I am working in a startup and we make an update almost all day as the application has a lot to be finished and an enormous amount of bugs. Sometimes we may need all the users to update, so we have a compulsory update page where we take the user to the play store. But the play store will not show the update.

So, I started to search on StackOverflow where an answer said that the play store has a bug. It said that if we clear the cache and storage of the play store, it will show the update and it worked. I cannot tell all my users to clear the cache of the play store.

Is there any way we could tell play store when redirecting that this version code is the latest one?

Current code that I am using:

try {
    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=applicationID")))
} catch (e: ActivityNotFoundException) {
    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=applicationID")))
}

[Edit]

If the play store does not show an update after showing "production" in the console, We could clear the cache of the play store and the update will be shown.

[Clarification]

Sometimes the user is using the 3 times older version, still play store is not showing the update.

3 Answers

There is an official api that allows you to query google play from the app itself, see it here. You can get information about update availability and even perform the update in the background (partially). You'll also get new version code info.

It works fine, for me it always shows proper status for current user (so if this api shows that update is there - it's always available for that user). So, IMO, it's the best way to bypass caches that google play has.

this will take 5 minutes, use branch.io for links (you do not need to install the SDK)

  • signup create new app, write the name of the app
  • got to "Configuration" from left menu select "I have an Android App"
  • search for your app and select it then fill other options if you like
  • it will give you a link "https://[YOUR_APP_ID ].app.link"
  • use this link instead of the default link

they have a way to redirect the link correctly with proper refresh

val appUpdateManager = AppUpdateManagerFactory.create(context)

val appUpdateInfoTask = appUpdateManager.appUpdateInfo

appUpdateInfoTask.addOnSuccessListener {
    appUpdateInfo ->
      if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE
        // you may use AppUpdateType.FLEXIBLE also
        &&
        appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE)
      ) {

        try {
          startActivity(Intent(Intent.ACTION_VIEW,
            Uri.parse("market://details?id=applicationID")))
        } catch (e: ActivityNotFoundException) {
          startActivity(Intent(Intent.ACTION_VIEW,
              Uri.parse("https://play.google.com/store/apps/details? 
                id = applicationID ")))
              }
            }
          }

The code is self explanatory. Google has released new feature for it In-app updates for the details can be found here link1 link2

Related