I'm creating an Android app that will be packaged and distributed in both lite (free) and full versions across perhaps 5 app stores.
The app contains a Service
triggered by AlarmManager.setRepeating(...)
, so that it fires at an interval configurable by the user, usually between every 5 minutes and hourly.
The trouble I foresee is that a user may wind up with both free and full versions of the app, and potentially from more than one store. What can I do to prevent multiple instances of the Service
from being triggered by the AlarmManager
? Will it help to make sure the Service
name (package name and <service>
attribute in the manifest) is the same? Is there a way that one variant of the app can, on being launched for the first time, disable pending intents requested by the other variants?