I am actually working on a small app and I am emulating it on my Android device (Android 7.1 - clear flashed Android from LineageOS). My problem is that I need to take a look into my SQLite tables, but I can't find the file so I came up with an idea. If I can't look to it, because of Android, let's copy the file to computer.
But to be honest, I don't know how to do that. I found this, but my Xamarin telling me he don't understand that script.
public static void BackupDatabase(string sourceFile, string destFile)
{
using (SQLiteConnection source = new SQLiteConnection(String.Format("Data Source = {0}", sourceFile)))
using (SQLiteConnection destination = new SQLiteConnection(String.Format("Data Source = {0}", destFile)))
{
source.Open();
destination.Open();
source.BackupDatabase(destination, "main", "main", -1, null, -1);
}
}
He doesn't understands the .Open();....
SQLiteConnection doesn't containts definitions for Open and there is no extending method Open..... (don't you missing some directives?)