简体   繁体   中英

Android - Where do I store app specific data that doesn't get wiped on app update but does get deleted on uninstall?

I'm having trouble determining where I should save data for an android game. I'm looking for a place that provides the following conditions:

  1. The user can find this folder to back up and restore their data.
  2. The data doesn't get wiped if there is an update to the app.
  3. The data is cleared when the app is uninstalled.

The data is generated by the app and is not replaceable so it is important that it persists through updates. However, the data is specific to the app and not something generic like a picture.

You can store the data in the Shared Preferences. It will fit your requirements

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM