GeofenceMonitor.StatusChanged Event
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.
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
TypedEventHandler<GeofenceMonitor,IInspectable>
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.