An Android app remembers its data after uninstall and reinstall

后端 未结 8 2265
半阙折子戏
半阙折子戏 2020-11-28 17:58

While developing an Android app targeting all versions above 4.1, I observed that uninstalling my app and installing it again does not clear its data.

The app is d

8条回答
  •  半阙折子戏
    2020-11-28 18:27

    You should check your device's Backup and Reset settings, and turn off Automatic restore (when reinstalling an application, backed up settings and data will be restored.)

    Turning off auto-backup is different from the auto-restore. If you think it will be helpful to turn on auto-backup for your application do so. But if you think this will make end users who are not aware that the auto-restore feature of their device is turned on, feel free to turn it off.

    In my case, I turned off the allowBackup feature, but since I already had a backup of the previous version on the Cloud, it still kept on restoring.

    See image as reference for a Samsung device on Android 6.0. Other devices and versions may have a different screen. See image below.

    Automatic Restore Setting under Backup and Reset

提交回复
热议问题