Android Question Detecting an OS shutdown

InfiniteImp

Member
Licensed User
Longtime User
Hi, is there a way for me to detect that the OS is shutting down so I can take steps to save data I have in memory? I have an app which runs a service and is set to startup at boot. The user may never launch the UI so I can't count on Activity_Pause as it never fires. I tried the Service_Destroy events in both my service module and the Stater module but they don't fire either.

Do I have any way to know that the app (and its service) is being terminated as a result of a device reboot?

Thanks.
 

InfiniteImp

Member
Licensed User
Longtime User
Intents are something I haven't played with yet. Still really on my first app. Time to do some reading! Thanks mj.
 
Upvote 0

InfiniteImp

Member
Licensed User
Longtime User
You should expect your app to be killed without any indication.
- Save the data every 10 seconds.
- Use KVS2 which is based on a SQLite database so everything is stored all the time.

Thanks for that. I'm not familiar with KVS2. Where do I find details?
 
Upvote 0

InfiniteImp

Member
Licensed User
Longtime User
There's a box on top of the screen labeled SEARCH, type KVS2 there and prepare to be amazed. Trust me, the search feature of the forum really works.

Not as amazed as I expected. One match, and it appears to be a member question. What I was really hoping for was documentation on how to implement it.

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…