4

I'm writing some code in my Android app that checks if the app has been updated from the Play Store and to force the user to do a fresh synchronize with the web back-end if it has.

My question is whether it's safe to assume that when an app gets updated from the Play Store, will it quit the running instance of that app, if it is running, and launch the default Activity when it's next launched?

And, if it's the same for:

  1. Automatic updates in the background.

  2. Manual update from the user using the Play Store app.

This is useful to know because if the app does quit after an update, I can put the code to check if the app has been updated in my default Activity and not have to check for this elsewhere throughout the app.

It's tricky to test this and I couldn't find much documentation around it so I think it would be useful to have this info out in the wild for others.

Thanks!

Joshua Pinter
  • 45,245
  • 23
  • 243
  • 245

1 Answers1

3

I can only answer from what I've observed using my device, as there's no documentation detailing any of that.

But the answer is yes. It does quit the whole application (completely kill the VM) and it does not re-open anything.

What happen to me: I had Gmail open, when to Google Play, clicked Updated now and went by to my e-mails. At some point Gmail just quit. I checked notification and it said "installing Gmail...". After the update was complete it did not open again or anything. I click on the icon and it opened on the main inbox.

But also that's a very simple test for you to do with any app you have installed and it have an update available.

Joshua Pinter
  • 45,245
  • 23
  • 243
  • 245
Budius
  • 39,391
  • 16
  • 102
  • 144