I've just tested manually the case when you update the application via Play Market (real devices, Samsung tablet with Android 7.0, One Plus with Android version 8.0.0).
- If the app is running in the foreground and you update it, the app is being killed. No restart. And when you start it over, the app is created from scratch.
- If the app is running in the background - same behavior.
Also you can simulate app update by the command adb install -r yourApp.apk
. As it's mentioned here and here.
I've noticed, when application is running and you reinstall the app with the adb command mentioned above, onDestroy
is not called. App is not restarted. And when you start it over - it is created from scratch. Basically, same behavior as when I test manually with Play Market.
As a conclusion, when the app is being updated by Play Market, and it's running (background or foreground), it is simply killed by the system.