I don't want to let Settings clear my app sharedPreference
by anyone: is it possible?
Asked
Active
Viewed 2,690 times
9
-
I found another way, check my edit. – JJ86 Dec 16 '13 at 10:59
-
but i don't want to keep database on remote server! instead i want to prevent clearing sharedPref. thanks for ans.. – Dec 16 '13 at 11:10
-
Understand, there is only one answer: is not possible ;-) . – JJ86 Dec 16 '13 at 12:02
-
1i found a way to prevent data being cleared from shared preference...See My Answer ::))) – Jan 31 '14 at 08:05
2 Answers
3
I found this similar question:
Shared preferences and files not saved to the SD card will be deleted when the app is uninstalled.
Files saved to the SD card will persists after uninstall, however, the user will have access to read, over-write, and delete these files at will.
If you need truly permanent storage the best way forward would be to store the data remotely on a server that you control.
If you don't care about data, then you can save it on SD Card.
EDIT
I think that BFil answer's is very good on this post, check it.
My final verdict
After long research (for my pure and insane curiosity!), there is no way (at the moment?) to preserve SharedPreference
after clear on Settings: the only way is a server vault or Data Backup.
-
i found a way to prevent data being cleared from shared preference...See My Answer ::))) – Jan 31 '14 at 08:05