0

Possible Duplicate:
How to know my Android application has been upgraded in order to reset an alarm?

I have a app run as service and published in google play. I face on a problem that when I have a new version release and publish to google play that all device will auto update but the service will not be restart until open app or reboot.

I want to know how to resolve this problem like facebook, whatsapp....

Please Help!

Community
  • 1
  • 1
Eagle
  • 451
  • 2
  • 5
  • 14
  • See http://stackoverflow.com/questions/2133986/how-to-know-my-android-application-has-been-upgraded-in-order-to-reset-an-alarm. You should be able to use a `BroadcastReceiver` to listen for `ACTION_MY_PACKAGE_REPLACED` to tell when your app is updated. – quietmint Sep 04 '12 at 02:18
  • "ACTION_MY_PACKAGE_REPLACED" only for API Level 12 to use. How about API level 8 to 11? – Eagle Sep 05 '12 at 01:50
  • You should receive `ACTION_PACKAGE_REPLACED` as of API level 3, and the data of this `Intent` should contain the name of the package that was upgraded. You can check this data to see if it was your package that was upgraded. – quietmint Sep 05 '12 at 02:26

0 Answers0