onPause()
is the last method that's guaranteed to be called before the process can be killed—if the system must recover memory in an emergency, thenonStop()
andonDestroy()
might not be called. Therefore, you should useonPause()
to write crucial persistent data (such as user edits) to storage.
It doesn't matter if you used finish()
or the system killed your Activity on its own. If the system "wants" to recover memory, there's no guarantee that onDestroy()
or onStop()
will be called.