Hi.
I have a new earthquake notification android app thats in it's initial release version. I have a problem currently. My app has a service running in background, this schedules itself to run every X period. To schedule itself it needs to run atleast once. Currently that happens when you boot the phone. Obviously I do not want user to reboot his phone, once he installs the app.
Also what I do not want is to have my app UI invoke it everytime it runs. Because that would clearly screw up the user scheduling. I need to instead know that either when my UI app runs for first time on a phone, it should be able to run the service so that it can schedule itself and keep running as expected in future.
Alternative way that I could solve it is, that if I know a list of existing alarms to wake a service, as then I would know if an app is already running or not.
If you'd like to see the app source code or run a binary file; Please look at the following github url
I hope I am clear in my intent. Just to give some background on app; It's a notification app for android phone which generates notification when an earthquake happens and also shows the affected area on map with additional functionality. It has a UI app, that shows the list of earthquakes in past. And a service that monitors for new ones.
Thanks in advance.