posted 9 years ago
You can add a key listener to your activity like this:
But why would you want to do this, instead of the user staying logged in? I can think of no mobile app where the user gets logged out like that (except for a password app, for obvious reasons). I think that might not go down well with your users.