In my application during normal operation the onRestoreInstanceStatance function is executed and causes a null pointer exception in some listener, without invoking that listener. My app contains a lot of data that I write to a file in onPause and restore in onResume and onRestoreIn
开发者_如何学编程stanceStatance. How can I make the app stable?
Make sure you assign listeners in the end of the onResume
, that will ensure no listeners are fired BEFORE the initial state is set. Then in onPause
first thing to do is to remove listeners.
继续阅读:android
精彩评论