Hello John
Thank you for responding.. Does the StartServiceAt deal with the device destroying the service in low memory situations? I will be implementing a global variable for the activity I have to revive after sleep so that suggestion fits very well but does it not activate the app when the service starts the activity? I would like it to activate the activity but not activate the app unless it was currently being used by the user..
Kindest regards,
Derek.
The startServiceAt should be ok for you. In any OS if there is not enough memory then you cannot do much about, but android is quite good at this. I might just add the data in the main activity may be unavailable when your service starts, I would suggest your create a type structure to hold all your data or you can write it to a keystore db file.
I think you might be confused with the app/activity bit. You should think of an activity as a user interface (Windows Forms etc.). Do not put any processing code in an activity, user mod's for that. So, when your service is started again the activity will not be started unless you activate it. A service is in independent process and can run when every you like.
I have one particular app then has a few services that run in the background independent of the UI (Activity). These services handle GPS/Bluetooth/WiFi/IBeacons and socket connections to back end servers for data delivery.
Hope this helps you.
Have fun
Regards
John.