We have one very difficult to reproduce problem with an app. The use case is as follows:
- User opens app
- User leaves app in background
- User openes 5 to 7 more apps
- System kills our app
- When user tries to resume app, app crashes due to
NullPointerException
I was trying to use console log with Application
class method onTrimMemory()
and onLowMemory()
but this methods are not being called. Is there any method or callback I can be listening to know when android system will kill my app due to many more apps being opened and in that case for me to do something?