What I want to do is to know when user closes the app from Android Launcher's menu, which gets opened on home button long click:
I want to do some operations when user closes the app.
Actually, I want user to logout each time he leaves the app, but as long as he can close app in this was too, I have to handle this event and then make my operations.
I've tried to google this one, but I couldn't find anything considering this.
I don't want to override onStop() or onDestroy(), as long as the user may come back to the app then, in that case I don't have to make my changes. Don't advice this. I only want to make changes, when user closes app entirely.
So my questions are:
Isn't there anything like
onApplicationDestroy()
?Is it possible to make connection with server and pass some values when user closes app in this way?