GeofenceMonitor.GeofenceStateChanged | geofencestatechanged event

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

Syntax


function onGeofenceStateChanged(eventArgs) { /* Your code */ }
 
// addEventListener syntax
geofenceMonitor.addEventListener("geofencestatechanged", onGeofenceStateChanged);
geofenceMonitor.removeEventListener("geofencestatechanged", onGeofenceStateChanged);
 
- or -

geofenceMonitor.ongeofencestatechanged = onGeofenceStateChanged;


Event information

Delegate TypedEventHandler<GeofenceMonitor, Object>

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.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Devices.Geolocation.Geofencing
Windows::Devices::Geolocation::Geofencing [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8.1

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Devices.Geolocation.Geofencing
Windows::Devices::Geolocation::Geofencing [C++]

Metadata

Windows.winmd

See also

Geofence
GeofenceMonitor

 

 

Show:
© 2015 Microsoft