I am using an alarm manager with inexactRepeating
starting a pendingIntent
.
Works great - only problem is that the service is running every time the app is started, after onDestroy
(ie orientation change, manually swiping app in recent).
I have it set to 20 min intervals, and it does so as long as I dont onDestroy the app - the onCreate
automatically starts the service which screws up my timing. The service is only ever called, once, through the alarm manager.
How do I check to see if the app needs to run it? Boolean of is running inside the service in shared preferences or something?