Anytime I publish a new version of my app in the Market, if the user had enabled the \"auto update\" option, the app will be updated automatically.
The app contains
It's something you'll have to test carefully but you should be able to catch it with a broadcast receiver with the action Intent.ACTION_PACKAGED_REPLACED
Then you start the service from your receiver.
If your app is running on API 12
or higher, I would recommend registering a BroadcastReceiver
listening to android.intent.action.MY_PACKAGE_REPLACED
.
This Intent is only triggered if YOUR application got an update.
Register a BroadcastReceiver
to Intent.ACTION_PACKAGE_REPLACED
Then, compare EXTRA_UID
with your own. If it matches, you can start your service again.