Apps that target Android 6.0 (API level 23) or higher automatically participate in Auto Backup. This is because the android:allowBackup
attribute, which enables/disables backup, defaults to true if omitted. To avoid confusion, we recommend you explicitly set the attribute in the <application>
element of your AndroidManifest.xml.
<application ...
android:allowBackup="false">
</application>
Files that are backed up
By default, Auto Backup includes files in most of the directories that are assigned to your app by the system:
Shared preferences
files.
Files
in the directory returned by getFilesDir()
.
Files
in the directory returned by getDatabasePath(String)
, which also includes files created with the SQLiteOpenHelper
class.
Files
in directories created with getDir(String, int)
.
Files
on external storage in the directory returned by getExternalFilesDir(String).
for more information read Auto Backup for Apps
or when you logout Try to delete in manually like this
File preferenceFile = new File("/data/data/"+ getPackageName()+ "/shared_prefs/");
File[] listFiles = preferenceFile.listFiles();
for (File file : listFiles) {
file.delete();
}