GeofenceMonitor.StatusChanged Event

Definition

Raised when the status of the GeofenceMonitor has changed.

// Register
event_token StatusChanged(TypedEventHandler<GeofenceMonitor, IInspectable const&> const& handler) const;

// Revoke with event_token
void StatusChanged(event_token const* cookie) const;

// Revoke with event_revoker
GeofenceMonitor::StatusChanged_revoker StatusChanged(auto_revoke_t, TypedEventHandler<GeofenceMonitor, IInspectable const&> const& handler) const;
public event TypedEventHandler<GeofenceMonitor,object> StatusChanged;
function onStatusChanged(eventArgs) { /* Your code */ }
geofenceMonitor.addEventListener("statuschanged", onStatusChanged);
geofenceMonitor.removeEventListener("statuschanged", onStatusChanged);
- or -
geofenceMonitor.onstatuschanged = onStatusChanged;
Public Custom Event StatusChanged As TypedEventHandler(Of GeofenceMonitor, Object) 

Event Type

Windows requirements

App capabilities
location

Remarks

When using a geofence, use the GeofenceMonitor's StatusChanged event to monitor changes in location permissions instead of the StatusChanged event from the Geolocator class. A GeofenceMonitorStatus of Disabled is equivalent to a **Disabled **PositionStatus - both indicate that the app does not have permission to access the location.

Applies to

See also