You can't handle swipe, because system just removes your process from memory without calling any callback.
I have checked, that before user calls "recent apps" screen, onPause()
will be always called. So you need to save all data in onPause
method without checking isFinishing()
.
To check back button, use onBackPressed method.