I want to write a incomplete app state to a file if user leaves the app without saving the state. I believe I have to use onPause(). Is this recommended practice? (In onPause() i am going to encrypt the string and then create a file and store it, so bit time consuming).
If onPause() is not the place how to save the state?