Android app life cycle when the app is updated on the Play Store

I can’t find information about the life cycle of the application process when the application is updated on the Play Store.

For example, when an application process is running and some service does something and then starts the update, I expect that after a successful apk update, the whole process will be killed (where the "old" application was started), and then the process starts again (using " new "application.

Will this behavior be different for an automatically updated application and a manually updated application?

+5
source share
1 answer

You can stop the service and start it again by specifying the broadcast receiver with the intent as a REPLACEMENT PACKAGE to verify that the package has been updated and if it indicates that your application has been updated, and then complete the necessary task. It also works for both automatic and manual updates.

0
source

Source: https://habr.com/ru/post/1233316/


All Articles