Reputation: 3027
I have set preferences. But in some devices even after I uninstall the app and then again reinstalling it, the preferences value seems to be there and open the Home form directly without opening login form. If I clear the caches and data frm application setting, then it works fine.
login connection
Preferences.set(AllUrls.userIdPreference, user_id);
Main.java
String userId = Preferences.get(AllUrls.userIdPreference, null);
if (userId == null) {
new Login(theme).show();
} else {
new Home(theme).show();
}
It works in some devices but doesnot in other. I have got same problems while using Storage instead of preferences too.
Upvotes: 2
Views: 53
Reputation: 52760
Storage is wiped on uninstall. What you are might be seeing is Android automatically restoring backup. If you are installing via the store this could happen and you can probably delete the backup too via app setup.
We now also have a new build hint android.allowBackup=false
which will block the OS's automatic backup.
Upvotes: 2