In case of low memory or configuration changes, there is a chance that android may force-kill your application before reaching onStop(). onPause() is the only function that will be called with out fail before killing the application. so save all persistent data like DB tables in onPause() only.
Note : We can't save all database tables in onSaveInstanceState, because that function will not be called if user presses back button.
Note : We can't save all database tables in onSaveInstanceState, because that function will not be called if user presses back button.
No comments:
Post a Comment