mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
30 lines
No EOL
697 B
C#
30 lines
No EOL
697 B
C#
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
|
|
{
|
|
LocationManager locationManager = (LocationManager)Android.App.Application.Context.GetSystemService(Context.LocationService);
|
|
return locationManager.IsProviderEnabled(LocationManager.GpsProvider);
|
|
}
|
|
}
|
|
}
|
|
} |