0

if I save my data in SharedPreferences then on uninstall followed by reinstall looses my data.

Where do I save data that will survive a complete uninstall and then reinstall.

NOTE: SharedPreferences data is retained if app is updated without uninstalling it.

Mck
  • 129
  • 1
  • 10

1 Answers1

0

When you uninstall your app completely from the device, all the cached and storage data related to this app is removed. The only way to make user's data survive reinstalling the app is to back it up using some cloud services or api's. E.g. save the data to firebase storage or let the user export and import their data to google drive. Using external storage might be an option, but in this case it's not guaranteed, that the data will be there during the next start of the app. In addition, it's usually much less secure. Hope this helped. Cheers.

Vladimir Gladun
  • 416
  • 2
  • 16