Skip to content Skip to sidebar Skip to footer

Is There A Way To Restart A Service After Upgrading The Application On Android?

After upgrading my application I would like the service to restart if it was running before. Is there any way to do this? I didn't see any Broadcast Intents that I could register

Solution 1:

You are right that you should be using a BroadcastReceiver.

Have a look at this question about restarting Alarms on upgrade; it shows how you can use the ACTION_PACKAGE_REPLACED Intent to see when an application is upgraded.

Post a Comment for "Is There A Way To Restart A Service After Upgrading The Application On Android?"