Jaa


GeofenceMonitor.GeofenceStateChanged Event

Definition

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

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

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

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

Event Type

Windows requirements

App capabilities
location

Remarks

This event is raised when your app is running and the state of a geofence registered by your app changes. This event is also raised when your app activates if there are unread reports in the collection obtained by calling ReadReports. This allows an app that is coming back from being suspended to be notified that there are unread reports in the queue and update the UI accordingly. This also allows your app to read reports that occurred in the background in cases where your background task was not launched to due to conditions set with SystemCondition, such as waiting for an internet connection or waiting for the user to be present.

Applies to

See also