mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-05-15 13:56:27 +02:00
Initial version.
This commit is contained in:
parent
e4fb48f6ab
commit
10dbeb5a90
737 changed files with 61885 additions and 0 deletions
30
TINK/TINK.Android/Model/Device/Gps.cs
Normal file
30
TINK/TINK.Android/Model/Device/Gps.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
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)Forms.Context.GetSystemService(Context.LocationService);
|
||||
return locationManager.IsProviderEnabled(LocationManager.GpsProvider);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue