Reputation: 869
following problem: I'm running a Cordova-based hybrid app and use IndexedDB as my data storage. On iOS everything's fine, but on Android there's the problem, that on some devices this data is being restored after a new installation of the app. I have tried two different ways to clean-up the data: manually executing .clear() on every storage and telling IndexedDB to completely remove the database using the .deleteDatabase() method. Afterwards I opened the Chrome dev tools and took a look into the application data -> all data were erased...until removing and re-installing the app! It's not the latest data that is being restored...some data from Nov '16. And I have absolutely no idea where this data comes from.
For your information: I'm ruinning the application on Android 7.0 and deliver Crosswalk 23 with it which is based on Chromium 52.
Best regards
Sven
Upvotes: 2
Views: 863
Reputation: 5167
Since Android 6.0 the android:allowBackup
property is set to true
by default and this is why your data persist when uninstalling the app.
You can change that either by the manifest
file of android or config.xml
of your cordova application.
This is how you set the property from config.xml:
<config-file platform="android" parent="/manifest">
<application android:allowBackup="false"></application>
</config-file>
Upvotes: 2