Class GpsReceiver
A GPS receiver. Implemented as a singleton.
Inheritance
System.Object
GpsReceiver
Assembly: SensusAndroid.dll
Syntax
public class GpsReceiver : Object
Fields
SINGLETON
Declaration
public static readonly GpsReceiver SINGLETON
Field Value
Properties
Locator
Declaration
public IGeolocator Locator { get; }
Property Value
Type |
Description |
Plugin.Geolocator.Abstractions.IGeolocator |
|
MinimumDistanceThreshold
Declaration
public int MinimumDistanceThreshold { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
AddListenerAsync(EventHandler<PositionEventArgs>, Boolean)
Declaration
public Task AddListenerAsync(EventHandler<PositionEventArgs> listener, bool includeHeading)
Parameters
Type |
Name |
Description |
System.EventHandler<Plugin.Geolocator.Abstractions.PositionEventArgs> |
listener |
|
System.Boolean |
includeHeading |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Get()
Declaration
public static GpsReceiver Get()
Returns
GetReadingAsync(CancellationToken, Boolean)
Declaration
public Task<Position> GetReadingAsync(CancellationToken cancellationToken, bool checkAndObtainPermission)
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
System.Boolean |
checkAndObtainPermission |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<Plugin.Geolocator.Abstractions.Position> |
|
RemoveListenerAsync(EventHandler<PositionEventArgs>)
Declaration
public Task RemoveListenerAsync(EventHandler<PositionEventArgs> listener)
Parameters
Type |
Name |
Description |
System.EventHandler<Plugin.Geolocator.Abstractions.PositionEventArgs> |
listener |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|