Question: Android 6.0 and above not clearing sqlite data from the phone after uninstalling the application

Question

Android 6.0 and above not clearing sqlite data from the phone after uninstalling the application

Answers 3
Added at 2017-05-26 07:05
Tags
Question

In android 6.0 and above when you uninstall the application and install again the same application(same package) then it showing the old sqlite data, but in lower version after uninstalling the application sqlite data also clearing from the phone.

Answers to

Android 6.0 and above not clearing sqlite data from the phone after uninstalling the application

nr: #1 dodano: 2017-05-26 07:05

Uninstall the app then restart the phone. That solves the problem on Marshmallow.

nr: #2 dodano: 2017-05-26 07:05

From the doc:

Since Android 6.0 (API 23), Android has offered the Auto Backup for Apps feature as a way for developers to quickly add backup functionality to their apps. Auto Backup preserves app data by uploading it to the user's Google Drive account, where it is protected by the user's Google account credentials.

So when you reinstall the app:

Data is restored whenever the app is installed, either from the Play store, during device setup (when the system installs previously installed apps), or from running adb install. The restore operation occurs after the APK is installed, but before the app is available to be launched by the user.

To disable it, add this in the application tag:

android:allowBackup="false">

The default value is set to true.

Here is the link to the doc:
https://developer.android.com/guide/topics/data/autobackup.html

nr: #3 dodano: 2017-05-26 08:05

Have you taken permission of storage related to write or read storage? It may be reason of regarding permission.

Source Show
◀ Wstecz