when the users logs-in a value pair is added to a SharedPreference. When the Apps gets killed, i want the user to be logged out and by the next start needs to login again. If the Users switches from one activity to another and back to the mainactivity again, he is logged out.
The problem is that the onStop from the MainActivity gets called and unsets the entry in the SharedPreference. I want the entry to stay when switching between Activities but get unset when the app gets exited/killed.