First of all, please consider that I am a newbie to Xamarin.Forms and mobile app development in general, hence solution to this problem might be something pretty easy. Nevertheless, I did a lot of googling without any working solution.
My app is in Xamarin.Forms (c#) and I am using Visual Studio 19. I am testing it on Xiaomi phone.
I am dealing with a problem that occurs when deploying an app to phone. It only happens after some changes in AndroidManifest.xml (so I guess some kind of "deep" changes) and after uninstalling and reinstalling the app. The problem is that I store some SQLite data which I need to stay in the phone even after uninstalling (I need the data to be visible after opening the same app after reinstallation). But the app remembers some data which were an actual input like a week ago but doesn't restore (after reinstalling) anything newer than that. I'll give an example to demonstrate it better. I've stored something into SQLite database yesterday and today. When I uninstall the app, then I click the start-debugging button, it successfully builds, deploys etc. but after the app opens, it only shows the data from a week ago (and no yesterday/today input).
Now, in Android documentation, I've read that the auto backup (from phone to Google Drive) happens roughly once a day (if android:allowBackup="true", but that is by default). I've also read that putting android:fullBackupContent="true" in <application> (which is in AndroidManifest.xml) might help, but didn't in my case. I also know, that in VS there is this: Tools -> Options -> Xamarin -> Android Settings → "Preserve application data cache on device between deploys" (I have this ticked)
So my question is, how can I get my complete SQLite database even after reinstalling? Is there a way that I can save data X into SQLite database, 1 minute later uninstall the app, then install it back and see data X?
by the way, my manifest looks like this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.myappname">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<application android:label="myappname.Android"
android:allowBackup="true"
android:fullBackupContent="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
Hopefully, I have explained everything enough.
Thank You.