I\'ve got a Xamarin Forms app that uses an SQLite database to store user data, including a login token that I use for authenticating with a REST API.
I\'m getting a
As per the comment by @Commonsware, adding android:allowBackup="false"
to the AndroidManifest.xml
in the <application>
tag prevented the old data from being restored.
From the Android docs:
android:allowBackup
Whether to allow the application to participate in the backup and restore infrastructure. If this attribute is set to false, no backup or restore of the application will ever be performed, even by a full-system backup that would otherwise cause all application data to be saved via adb. The default value of this attribute is true.
It's still not clear to me why doing a Debug deploy of an app that was currently installed would trigger a restore-from-backup event.
Actually why do you want to store token in SQLite Table. You could use https://www.nuget.org/packages/Xam.Plugins.Settings/ to store token.