public static void InsertLocation(Location Location) { using (var db = new SQLiteConnection(DatabasePath)) { db.Insert(Location); } }
private async Task<Location> GetCurrentLocation() { var geolocater = new Geolocator(); var geoposition = await geolocater.GetGeopositionAsync(); var location = new Location(); location.Latitude = geoposition.Coordinate.Latitude; location.Longitude = geoposition.Coordinate.Longitude; location.Timestamp = DateTime.Now.ToUnixTimestampMS(); // TODO: check accuracies here mean the same thing location.Accuracy = (int)geoposition.Coordinate.Accuracy; return location; }