Geofence.Duration | duration property

Applies to Windows and Windows Phone

Gets the time window, beginning after the StartTime, during which the Geofence is monitored.

Syntax


var duration = geofence.duration;

Property value

Type: Number [JavaScript] | System.TimeSpan [.NET] | Windows::Foundation::TimeSpan [C++]

The time window, beginning after the StartTime, during which the Geofence is monitored.

Remarks

This property is read-only. Use one of the overloaded Geofence constructors to set the duration value.

When the duration time window expires, the system automatically removes the geofence from the system and stops monitoring it. If you want your app to be notified when a geofence expires, be sure to include the GeofenceState.Removed state when initializing the geofence.

The default value for this property is a TimeSpan with a time interval of 0. A time interval of 0 indicates that the geofence will not expire and will be monitored indefinitely or until the app manually removes the geofence.

Requirements

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

 

 

Show:
© 2014 Microsoft