2021-05-13 20:16:41 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
using Android.App;
|
|
|
|
|
using Android.Content;
|
|
|
|
|
using Android.Locations;
|
|
|
|
|
using Android.OS;
|
|
|
|
|
using Android.Runtime;
|
|
|
|
|
using Android.Views;
|
|
|
|
|
using Android.Widget;
|
|
|
|
|
using TINK.Model.Device;
|
|
|
|
|
using Xamarin.Forms;
|
|
|
|
|
|
|
|
|
|
[assembly: Dependency(typeof(TINK.Droid.Model.Device.Gps))]
|
|
|
|
|
namespace TINK.Droid.Model.Device
|
|
|
|
|
{
|
|
|
|
|
public class Gps : IGeolodationDependent
|
|
|
|
|
{
|
|
|
|
|
public bool IsGeolcationEnabled
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2021-08-28 10:04:10 +02:00
|
|
|
|
LocationManager locationManager = (LocationManager)Android.App.Application.Context.GetSystemService(Context.LocationService);
|
2021-05-13 20:16:41 +02:00
|
|
|
|
return locationManager.IsProviderEnabled(LocationManager.GpsProvider);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|