is it possible to intercept the event of system closing my application on low memory? I know there is a method "onLowMemory" but it doesn't mean that my application will be closed after it is invoked.
My problem is that I'm co-developing an app that uses a lot of static data (which I know should be avoided, but that's not my decision and at this point it's almost impossible to change this fact). If I press home and don't get back to this application for eg. 10 hours it would probably force close when I do because the static data isn't there anymore (app got killed by the system).
Is it possible to know when the app is about to get killed by the system? I would store the static data somewhere to get it later then, when I recreate my app. What are possible solutions?
Maybe, if hooking to such an event is impossible, I could make a service that saves this state every few minutes, so when app gets killed I would probably have the latest static data?
Did you encounter this problem? What are your solutions/suggestions?