GeofenceStateChangeReport GeofenceStateChangeReport GeofenceStateChangeReport GeofenceStateChangeReport GeofenceStateChangeReport Class

Definition

Contains the information about the state changes for a Geofence.

public : sealed class GeofenceStateChangeReport : IGeofenceStateChangeReport
struct winrt::Windows::Devices::Geolocation::Geofencing::GeofenceStateChangeReport : IGeofenceStateChangeReport
public sealed class GeofenceStateChangeReport : IGeofenceStateChangeReport
Public NotInheritable Class GeofenceStateChangeReport Implements IGeofenceStateChangeReport
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location

Remarks

Use the GeofenceMonitor.ReadReports method to get a collection of GeofenceStateChangeReport objects which contain information about changes in state to a geofence.

Properties

Geofence Geofence Geofence Geofence Geofence

The Geofence object whose state has changed.

public : Geofence Geofence { get; }
Geofence Geofence();
public Geofence Geofence { get; }
Public ReadOnly Property Geofence As Geofence
var geofence = geofenceStateChangeReport.geofence;
Value
Geofence Geofence Geofence

The Geofence object whose state has changed.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location
See Also

Geoposition Geoposition Geoposition Geoposition Geoposition

The position of the Geofence object whose state has changed.

public : Geoposition Geoposition { get; }
Geoposition Geoposition();
public Geoposition Geoposition { get; }
Public ReadOnly Property Geoposition As Geoposition
var geoposition = geofenceStateChangeReport.geoposition;
Value
Geoposition Geoposition Geoposition

The position of the Geofence object whose state has changed.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location
See Also

NewState NewState NewState NewState NewState

The new state of the Geofence object whose state has changed.

public : GeofenceState NewState { get; }
GeofenceState NewState();
public GeofenceState NewState { get; }
Public ReadOnly Property NewState As GeofenceState
var geofenceState = geofenceStateChangeReport.newState;
Value
GeofenceState GeofenceState GeofenceState

The new state of the Geofence object whose state has changed.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location
See Also

RemovalReason RemovalReason RemovalReason RemovalReason RemovalReason

Indicates the reason a Geofence was removed.

public : GeofenceRemovalReason RemovalReason { get; }
GeofenceRemovalReason RemovalReason();
public GeofenceRemovalReason RemovalReason { get; }
Public ReadOnly Property RemovalReason As GeofenceRemovalReason
var geofenceRemovalReason = geofenceStateChangeReport.removalReason;
Value
GeofenceRemovalReason GeofenceRemovalReason GeofenceRemovalReason

Indicates the reason a geofence was removed.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location

Remarks

This property defaults to a value of Used. You should ignore this property unless the Geofence has changed state to being Removed.

Removal event notifications can happen when the app is in the foreground or the background. However, removal events themselves do not fire the trigger when the app is in the background. This means that background apps cannot use the removal event to wake up the app. When an app comes back from being in the background, it can see the removal event that occurred waiting in the GeofenceStateChangeReports.

See Also

See Also