GeofenceMonitor GeofenceMonitor GeofenceMonitor GeofenceMonitor GeofenceMonitor Class

Definition

Contains the information about the monitored Geofence objects.

public : sealed class GeofenceMonitor : IGeofenceMonitor
struct winrt::Windows::Devices::Geolocation::Geofencing::GeofenceMonitor : IGeofenceMonitor
public sealed class GeofenceMonitor : IGeofenceMonitor
Public NotInheritable Class GeofenceMonitor Implements IGeofenceMonitor
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location

Remarks

Use the static Current property to get the GeofenceMonitor object which contains all of an app’s geofence information.

You will receive an IDS_GEOFENCEMONITOR_OUT_OF_SYNC exception if the Location Framework Service event state is out of synchronization with the GeofenceMonitor. You can attempt to recover by removing all event handlers on the GeofenceMonitor or restarting the application. Once all event handlers have been removed, you may add back any event handlers and retry the operation.

Properties

Current Current Current Current Current

Gets the GeofenceMonitor object which contains all of an app's Geofence information.

Geofences Geofences Geofences Geofences Geofences

Returns a vector of the app's Geofence objects currently registered with the system-wide GeofenceMonitor.

LastKnownGeoposition LastKnownGeoposition LastKnownGeoposition LastKnownGeoposition LastKnownGeoposition

Last reading of the device's location.

Status Status Status Status Status

Indicates the current state of the GeofenceMonitor.

Methods

ReadReports() ReadReports() ReadReports() ReadReports() ReadReports()

Gets a collection of status changes to the Geofence objects in the Geofences collection of the GeofenceMonitor.

Events

GeofenceStateChanged GeofenceStateChanged GeofenceStateChanged GeofenceStateChanged GeofenceStateChanged

Raised when the state of one or more Geofence objects in the Geofences collection of the GeofenceMonitor has changed

StatusChanged StatusChanged StatusChanged StatusChanged StatusChanged

Raised when the status of the GeofenceMonitor has changed.

See Also