I am using Async Storage to store some values in my react native app. I have a login so when I login into the app I am storing my id, when logout I am removing it.
But when uninstalling my app without logout then my data in async storage is not removing that refers to automatic login when installing the app again.
Can you please tell me how to solve this this happens in android device and version >6
Thank you.
clear() Erases all AsyncStorage for all clients, libraries, etc. You probably don't want to call this; use removeItem or multiRemove to clear only your app's keys.
If your data are stored at your app's folder or public folder, you can use react-native-fs to delete them.
It store data in the form of a key-value pair. React Native recommended to use abstraction on top of AsyncStorage instead of AsyncStorage directly as it operates globally.
I've got the same issue and it simply seems to be the direct cause of android's new manifest keyword:
<android:allowBackup="true">
You can find more information on android documentation but quickly it says that app locally saved data might be backed up on Google Drive on the latest versions of Android. You can disable it either by setting <android:allowBackup="false">
(true is the default behavior) or by disabling auto backup in your phone's settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With