Hello friends I am trying to store some data locally on my device with SQLite , but I have encountered some problems. I was researching that in order to store data on a device from Xamarin we must make different routes for each type of device, and that the way in which we route that route is through an interface. But I have not been around for some time without Xamarin finding my reference class ... another thing is that I'm not getting an error.
using System;
using System.Collections.Generic;
using System.Text;
using SQLite.Net.Interop;
namespace OwsX
{
public interface IConfig
{
string DbPath { get; }
ISQLitePlatform Platform { get; }
}
}
This is my configuration class for Android and as you can see it does not find my other class IConfig
using Android.Widget;
using SQLite.Net.Interop;
namespace OwsX.Droid {
class Config: IConfig {
private string dbPath;
private ISQLitePlatform platform;
public string DbPath {
get {
if (string.IsNullOrEmpty(dbPath)) {
var directory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
}
return dbPath;
}
}
public ISQLitePlatform Platform {
get {
if (platform == null) {
platform = new SQLite.Net.Platform.XamarinAndroid.SQLitePlatformAndroid();
}
return platform;
}
}
}
}
If anyone knows what is going on, I would be infinitely grateful for your comment. Thanks:)