Geofence class

Applies to Windows and Windows Phone

Contains the information to define a geofence, an area of interest, to monitor.

Syntax


Public NotInheritable Class Geofence

Attributes

[MarshalingBehavior(Agile)]
[Version(0x06030000)]

Members

The Geofence class has these types of members:

Constructors

The Geofence class has these constructors.

ConstructorDescription
Geofence(String,IGeoshape) Initializes a new Geofence object given the id and the shape of the geofence.
Geofence(String,IGeoshape,MonitoredGeofenceStates,Boolean) Initializes a new Geofence object given the id, the shape of the geofence, the states to monitor the geofence for, and the singleUse flag.
Geofence(String,IGeoshape,MonitoredGeofenceStates,Boolean,TimeSpan) Initializes a new Geofence object given the id, the shape of the geofence, the states to monitor the geofence for, the singleUse flag, and the dwellTime for the geofence.
Geofence(String,IGeoshape,MonitoredGeofenceStates,Boolean,TimeSpan,DateTime,TimeSpan) Initializes a new Geofence object given the id, the shape of the geofence, the states to monitor the geofence for, the singleUse flag, the dwellTime for the geofence, the time to start monitoring the geofence, and the duration of the geofence.

 

Properties

The Geofence class has these properties.

PropertyAccess typeDescription

Duration

Read-onlyGets the time window, beginning after the StartTime, during which the Geofence is monitored.

DwellTime

Read-onlyThe minimum time that a position has to be inside or outside of the Geofence in order for the notification to be triggered.

Geoshape

Read-onlyThe shape of the geofence region.

Id

Read-onlyThe id of the Geofence.

MonitoredStates

Read-onlyIndicates the states that the Geofence is being monitored for.

SingleUse

Read-onlyIndicates whether the Geofence should be triggered once or multiple times.

StartTime

Read-onlyThe time to start monitoring the Geofence.

 

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

None supported [Windows Store apps only]

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

Windows.Devices.Geolocation
Geofencing, start to finish
Object

 

 

Show:
© 2014 Microsoft