TheCocoaProject / cordova-plugin-nativestorage

Cordova plugin: Native storage of variables in Android, iOS and Windows
http://thecocoaproject.github.io/
Apache License 2.0
292 stars 106 forks source link

Android Entries Not Cleared #57

Closed ghost closed 7 years ago

ghost commented 7 years ago

I've noticed that recently the NativeStorage entries are not being cleared after uninstalling the app. Looking at the NativeStorage github, it seems like android is using Sharedpreferences.

I googled similar issues and it seems like, we have to set android:allowBackup=false in the application tag of AndroidManifest.xml.

Currently, my application tag looks like this: <application android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true">

GillesC commented 7 years ago

I don't think this is an issue, because we haven't stated in the docs that the entries are not backed up. However, this could be added to the documentation, that android can backup the data --by default.

On Tue, 27 Dec 2016, 16:07 Maziar Fotouhi, notifications@github.com wrote:

I've noticed that recently the NativeStorage entries are not being cleared after uninstalling the app. Looking at the NativeStorage github https://github.com/TheCocoaProject/cordova-plugin-nativestorage, it seems like android is using Sharedpreferences.

I googled similar issues http://stackoverflow.com/questions/35517239/sharedpreferences-are-not-being-cleared-when-i-uninstall and it seems like, we have to set android:allowBackup=false in the application tag of AndroidManifest.xml.

Currently, my application tag looks like this: <application android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true">

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TheCocoaProject/cordova-plugin-nativestorage/issues/57, or mute the thread https://github.com/notifications/unsubscribe-auth/AIOhiydGkpl4An-B3GFIP3PvYkKGgJ4iks5rMSm6gaJpZM4LWU5l .

ghost commented 7 years ago

@GillesC Thanks for the quick reply. The first FAQ entry in the docs actually implies something like that, when it says that "the data should be persistent until the app is deleted from the device.":

image

GillesC commented 7 years ago

That sentence implies that persistence is ensured till uninstalling the app. It, however, does not say anything about maintaining persistence (or not) after uninstalling/reinstalling.

GillesC commented 7 years ago

But to avoid any further misunderstanding, I'll update the docs with your remark. Thank you for your contribution!

ghost commented 7 years ago

Thank you so much.