IGeolocation Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a way to get the current ___location of the device.
public interface class IGeolocation
public interface IGeolocation
type IGeolocation = interface
Public Interface IGeolocation
Properties
IsEnabled |
Returns true when the device's ___location services are enabled |
IsListeningForeground |
Indicates if currently listening to ___location updates while the app is in foreground. |
Methods
GetLastKnownLocationAsync() |
Returns the last known ___location of the device. |
GetLocationAsync(GeolocationRequest, CancellationToken) |
Returns the current ___location of the device. |
StartListeningForegroundAsync(GeolocationListeningRequest) |
Starts listening to ___location updates using the LocationChanged event. Events may only sent when the app is in the foreground. Requests Permissions.LocationWhenInUse from the user. |
StopListeningForeground() |
Stop listening for ___location updates when the app is in the foreground.
Has no effect when IsListeningForeground is currently |
Events
ListeningFailed |
Occurs when an error during listening for ___location updates arises. When the event is fired, listening for further ___location updates has been stopped and no further LocationChanged events are sent. |
LocationChanged |
Occurs while listening to ___location updates. |
Extension Methods
GetLocationAsync(IGeolocation, GeolocationRequest) |
Returns the current ___location of the device. |
GetLocationAsync(IGeolocation) |
Returns the current ___location of the device. |