public SQLiteConnection GetConnection() { SQLitePlatformAndroidN platform = new SQLitePlatformAndroidN(); string sqliteFilename = Configuration.DBname + ".db3"; string documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); // Documents folder string path = Path.Combine(documentsPath, sqliteFilename); // FOR DEBUG REASON, REMOVE WHEN PUSHING TO USERS // path = path.Replace("data/user/0/triotech.hubo.droid/files/", "sdcard/Download/"); return(new SQLiteConnection(platform, path)); }
public SQLiteConnection GetConnection() { if (_connection == null) { string folder = Environment.GetFolderPath(Environment.SpecialFolder.Personal); string databaseFileName = Path.Combine(folder, GlobalConfig.DATABASE_NAME); //PreloadDbIfNeeded(databaseFileName); var platform = new SQLitePlatformAndroidN(); _connection = new SQLiteConnection(platform, databaseFileName); } return(_connection); }