0

I'm getting some weird behavior lately. It seems my share prefs are not getting deleted upon uninstall. When I reinstall my app after an uninstall, the shared prefs file still has the values from the previous install. This is very weird, I know. The only thing that blows away my shared prefs is using "Clear Data" in the settings app.

I've tried uninstalled both ways: by clicking uninstall in Settings and also adb uninstall.

Steps:

  1. Uninstall my app from the Settings app.
  2. run adb uninstall <package> for good measure.
  3. Install app again by launching it in debug mode.
  4. Hit initial breakpoint: shared prefs are still there.

I made sure my app isn't setting setting the prefs before it hits the breakpoint.

Note: My debug version is signed so I can test upgrades from the Google Play release version. However this problem happens on clean installs.

I'm running Oreo (8.1.0).

Has anyone else seen this very strange behavior?

Thanks in advance...

Barry Fruitman
  • 12,316
  • 13
  • 72
  • 135
  • 2
    https://stackoverflow.com/questions/32010538 – Mike M. Mar 12 '18 at 23:46
  • I notice that you edited only to specify the version you're running. I would point out that Automatic Backups were _introduced_ in Marshmallow. They're not specific to that version. Do you mean to say that Automatic Backups is not your issue? Did you test by setting `allowBackup` to `false` on the `` element in your manifest? – Mike M. Mar 13 '18 at 00:26
  • Yes the issue was backups. Thank you. – Barry Fruitman May 04 '18 at 22:23

0 Answers0