0

Google Play has an automatic update system for apps. When a new version is uploaded to the Developer Console the app is updated on user devices because the new versionCode is greater than the one that is already installed. But users could get a newer apk from other sources.

I would like to know some details about this automatic process, I mean:

A-Does Google Play keeps a value inside so it remembers what versionCode of an app it has officially installed?

or

B-Does Google Play inspects all installed apks so it can compare the version codes to the current versions officially provided by the developers on Google Play?

Note the difference:

-in the A case, it just remember what it officially installed but is not informed about the real versionCode the user has on the device; so it could try to update even when the user already got a newer apk from outside Google Play (fail);

-in the B case, the update system can understand what version in installed because it checks it; so the update doesn't even start if the user upgraded an app from outside the Google Play.

Which is the real case?

P5music
  • 3,197
  • 2
  • 32
  • 81

1 Answers1

0

It is case A - Google remembers which version of the app was last installed.

It does not check the device every time for the latest installed version.

How to verify this?

If you ever factory reset your phone or flash a ROM, go to play store from your browser and open an app page which you'd installed before you flashed the ROM or did a factory reset. It will still show as installed, although you wiped your device clean and it is not installed anymore.

Viral Patel
  • 32,418
  • 18
  • 82
  • 110
  • I do not mean everytime, I mean just when Google Play knows that the developer updated a new version to the Developer Console. In fact, I do not know when Google Play decides to check for updates, but I see that it happens. And then, what checks are really performed? – P5music Jan 18 '16 at 20:11
  • the updates are generally not available everywhere at once. So as and when the update info gets replicated to servers in different geographic locations (catering to different user groups), users are notified of the update if the version of current installation is lesser than that of the latest available (if a new version is uploaded by the developer) – Viral Patel Jan 18 '16 at 20:17
  • I would like to know if in that special moment when Google Play has decided that the versionCode it remembers is such that an update is now possible, it attempts the update or it checks the installed apk versionCode before attempting it. If it attempts without checking then it will fail, otherwise the user is not even bothered. – P5music Jan 18 '16 at 20:21
  • yes that is a good point. If the app is not installed the notifications do not show (from my personal experience - i flash a lot of ROMs). Hence it checks installation before showing notifications. But the web page will still keep showing it as installed, meaning google remembers it was installed. – Viral Patel Jan 18 '16 at 20:23