How can I trigger the Google Play Store's auto update mechanism?
Asked Answered
M

1

4

In short, I would like my app to be updated as soon as I release a new APK to the store.

I could not find any information about when the auto update actually occurs, and it seems it varies greatly - at one time it happened after a couple of hours and another time no updates for 12 hours. It seems that it happens on device reboot, but are there any other scenarios? Can I trigger it myself somehow (programmatically)?

My real scenario is a bit more complex, but the end result is the same:

  • I have a pre-installed app on the device which is also on the play store

  • As soon as the user adds an account my app shows in the play store app with an available update (same package, same signature, everything is legit)

  • I would like that update to happen as fast as possible

Any way to make that happen?

Moskva answered 28/1, 2015 at 13:56 Comment(5)
I believe the answer is "you can't", and at least not reliably. If there is no official method to force this, which there isn't I think, there might be some tricks you can do to game the system, but these won't be working too long. AFAIk, the official pov is that you upload an apk and then it is distributed per googles leasure.Shufu
To my knowledge it updates automatically as soon as possible IF automatic updates are enabled for your app. I'm assuming google has some sort of CDN set up which takes time to distribute the update. If you don't have permission to autoupdate or you added a required permission on your app, the user will have to accept manually.Unifoliate
@Unifoliate That is not what happens... The way I test it is I install manually an older version of my app and see how fast it is auto-updated. Since it is the same package, signed with the same signature etc. it updates with no problem, but how soon it updates is not very consistent.Moskva
@Shufu is correct. The base answer is: you can't. If you absolutely must have the user always on the last version your best option is to have an server with the latest version number, the app compares the version and if(old) you tell the user to update and finish() your activity.Inflammable
It's the user selection to enable/disable automatic app updates, not the developer.Tallith
D
1

No, you can't force Google Play to automatically update the app as soon as possible, but you can use the Google Play Core library to force the user to update the app when they turn it on. More information here: https://developer.android.com/guide/playcore/in-app-updates

This will make the user see a message telling them they need to update their app to a newer version.

Discontinuous answered 21/11, 2020 at 19:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.