sharee.bike-App/LastenradBayern/ShareeBike.Android/Model/Device/Gps.cs

30 lines
715 B
C#
Raw Normal View History

2021-11-07 19:42:59 +01: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;
2024-04-09 12:53:23 +02:00
using ShareeBike.Model.Device;
2021-11-07 19:42:59 +01:00
using Xamarin.Forms;
2024-04-09 12:53:23 +02:00
[assembly: Dependency(typeof(ShareeBike.Droid.Model.Device.Gps))]
namespace ShareeBike.Droid.Model.Device
2021-11-07 19:42:59 +01:00
{
2022-09-06 16:08:19 +02:00
public class Gps : IGeolodationDependent
{
public bool IsGeolcationEnabled
{
get
{
LocationManager locationManager = (LocationManager)Android.App.Application.Context.GetSystemService(Context.LocationService);
return locationManager.IsProviderEnabled(LocationManager.GpsProvider);
}
}
}
2021-11-07 19:42:59 +01:00
}