Skip to content Skip to sidebar Skip to footer

Web Storage In Cordova App Get Carried Over Even If App Is Removed

In a Cordova Android app, when I use Web storage (window.localStorage), I notice that sometimes when I uninstall the app (even via adb uninstall) and rebuild the app again, window.

Solution 1:

Android 6+ automatically does backup of the data and it's restored when you install the app again.

You can disable it by adding this to the config.xml

<edit-configfile="AndroidManifest.xml"target="/manifest/application"mode="merge"><applicationandroid:allowBackup="false"/><applicationandroid:fullBackupContent="false"/></edit-config>

That makes the app build fail, you have to add xmlns:android="http://schemas.android.com/apk/res/android" to the config.xml widget to make it build.

Post a Comment for "Web Storage In Cordova App Get Carried Over Even If App Is Removed"