GeofenceMonitor.GeofenceStateChanged GeofenceMonitor.GeofenceStateChanged GeofenceMonitor.GeofenceStateChanged GeofenceMonitor.GeofenceStateChanged GeofenceMonitor.GeofenceStateChanged Event

Definition

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

public : event TypedEventHandler<GeofenceMonitor, object> GeofenceStateChanged
// Register
event_token GeofenceStateChanged(TypedEventHandler<GeofenceMonitor, object> const& handler) const;

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

// Revoke with event_revoker
GeofenceStateChanged_revoker GeofenceStateChanged(auto_revoke_t, TypedEventHandler<GeofenceMonitor, object> const& handler) const;
public event TypedEventHandler<GeofenceMonitor, object> GeofenceStateChanged
Public Event GeofenceStateChanged As TypedEventHandler (Of GeofenceMonitor, object)
function onGeofenceStateChanged(eventArgs){/* Your code */}


geofenceMonitor.addEventListener("geofencestatechanged", onGeofenceStateChanged);
geofenceMonitor.removeEventListener("geofencestatechanged", onGeofenceStateChanged);

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.

See also