I have a weird bug in my app. It only happens, from what I see , in newer devices. When I uninstall the app, and the install it again, I noticed that certain keys are preserved in sharedpreferences, even if they were removed before.
For example :
1. User "abc" is logged in.
2. He logs out(his id is then erased from sharedpreferences by setting empty string value in the id key).
3. uninstalls the app
4. installs it again
5. on launching the app the "id" key exists in the shared preferences.
But it doesn't happen on all devices , so I guess it can be related to certain Android os versions..