Android M weird shared preferences issue

On my Nexus 5 running Android M Developer Preview 2, when uninstalling/reinstalling an app, the device is retrieving shared preferences I stored long ago, for instance a boolean isFirstLaunch.

The only way to clear these is to do it manually from the device settings.

  • How secure is proguard against reverse engineering?
  • how to delete table row in table layout in android
  • What to do when - java.io.FileNotFoundException: No content provider?
  • Android: Recording SoundPool output
  • How to programmatically take a screenshot in Android?
  • Get ActionBarSherlock actionBarSize in Android 2.x
  • Is there any change in shared preferences behavior on Android M? I can’t find any documentation regarding this.

    Or maybe the Android M Preview 2 ROM has a bug…

    Related posts:

    Bug with Override annotations in Eclipse
    Create image from view/screen in Android
    Recycler view not scrolling properly after implementing swipe to refresh layout
    Detecting whether Android device is a phone or a tablet with javascript
    How to add new field(s) to the contact?
    MomentJS like functionality for Android Apps
  • BroadcastReceiver for ACTION_MEDIA_BUTTON not working
  • Error inflating class EditText on creating TextInputLayout on Android 4.4.2:
  • Android Push Notification without using GCM
  • Challenges in RecyclerView of Android L
  • deviceReady not working in PhoneGap application, how to?
  • Android: Why can't I create a handler in new thread
  • 2 Solutions collect form web for “Android M weird shared preferences issue”

    That is because Android M will feature Automatic Backups (old link).

    Extract:

    The automatic backup feature preserves the data your app creates on a
    user device by uploading it to the user’s Google Drive account and
    encrypting it. There is no charge to you or the user for data storage
    and the saved data does not count towards the user’s personal Drive
    quota. During the M Preview period, users can store up to 25MB per
    Android app.

    Open settings -> Backup & reset -> automatic restore -> off
    if is on then app cache and database will be restore.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.