I can't find information about app's process life cycle when application is being updated by Play Store.
For example when app's process is running and some Service does something and then update starts, I expect that after apk is successfully updated whole process is killed (where "old" app was running) and then process is started again (with "new" app launched).
Would this behavior differ for auto-updated app and manually updated app?
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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With