krishna swaroopa I
krishna swaroopa I

Reputation: 371

Uninstall ReactNative App - Clean User Data using Asyncstorage

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.

Upvotes: 6

Views: 7057

Answers (2)

glocore
glocore

Reputation: 2164

Just wanted to add to user2015762's answer: if your build fails due to a conflict with the manifest of another package you're using, you may also need to add
tools:replace="android:allowBackup" to <application ...> and
xmlns:tools="http://schemas.android.com/tools" to <manifest ...>, like so:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="YOUR_APP_NAME">
...
<application
    android:allowBackup="false"
    tools:replace="android:allowBackup"
    ...>

Upvotes: 2

user2015762
user2015762

Reputation: 488

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.

Upvotes: 6

Related Questions