Home » Android » android – Can a user delete data stored in shared preferences?-Exceptionshub

android – Can a user delete data stored in shared preferences?-Exceptionshub

Posted by: admin February 24, 2020 Leave a comment

Questions:

Suppose i made an app which uses shared preferences,
will the data stored with shared preferences be deleted when user clears app storage?

if yes then what is alternative to store/retrieve important data faster which will not get erased by user?

i tried firebase-database, but it is lagging the speed/performance i require.

How to&Answers:

will the data stored with shared preferences be deleted when user clears app storage?

Yes.

what is alternative to store/retrieve important data faster which will not get erased by user?

Store it on a server.

i tried firebase-database, but it is lagging the speed/performance i require.

Then store it on a faster server, I guess. Or, use a local file as a cache, with the server acting as a backup location, should you need to restore the data at a later point.