when user exit the android app in the normal way (No Hard Exit like Force Close) i want the app to do something
im working on some kind of chat app and i want the app to update user status make it offline when the user close the app.
i try few solutions but nothing worked.
You will need to implement a
Serviceand then bind yourActivityto the service so that it is aware of the Activity's state.http://www.vogella.com/tutorials/AndroidServices/article.html