Android AlarmManager does not start after updating Google Play

I created an application that reminds people to resort on time. Every time I put a new APK on Google Play, I get a lot of complaints that the alarm no longer works. It starts working again only after the user starts the application (or reboots). Help!

+6
source share
2 answers

Check the ACTION_MY_PACKAGE_REPLACED action (on cells and above).

You should be able to register the broadcast receiver for it in the manifest, which can then reconfigure your alarms.

+8
source

Scheduled alarms will NOT be canceled during the upgrade. I checked this for Android versions 2.2 and 4.3 and the latest version of Google Play at the time of writing.

What needs to be done is that your new versions can handle all the pending intentions of any old version. It means:

  • the same definition of purpose in the manifest (broadcast receiver or service)
  • the same intention is β€œcontract”: actions, additions, etc.
+3
source

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


All Articles