I am using Xamarin to create a database if none existing.
public partial class App : Xamarin.Forms.Application
{ static BusinessDB database;
public static BusinessDB Database
{get {
if (database == null)
{database = new BusinessDB(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "BusinessDB.db3"));}
return database; } }
The Xamarin program then creates, updates, and uses tables in this SQLite database as needed.
I am wanting to create a Backup/ Import page that allows users to upload a database or download a database backup. When uploading a database that may have a name different than BusinessDB, such as Backup01012020CompanyXDB.db3, what should I do?
I want the user to have an option of where to save a backup, and also the ability to pick a database for import. Is there simple cross platform code suitable for this?
I am a newbie, but so far I am loving learning