-api-id | -api-type |
---|---|
M:Windows.Devices.Geolocation.Geofencing.Geofence.#ctor(System.String,Windows.Devices.Geolocation.IGeoshape) |
winrt method |
Initializes a new Geofence object given the id and the shape of the geofence.
The Id of the geofence.
The area that defines the geofence to monitor.
When this constructor is used, the MonitoredStates will default to monitor for both the Entered and Exited states, SingleUse will default to false, the DwellTime will default to 10 seconds, the StartTime will default to 0 meaning start immediately, and the Duration will default to 0, meaning forever.
The id value must be non-null and less than 64 characters.
The geoshape parameter must be a non-null Geocircle with a SpatialReferenceId that matches the platform or an exception will be thrown.
Geofencing, start to finish, Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean), Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan), Geofence(String, IGeoshape, MonitoredGeofenceStates, Boolean, TimeSpan, DateTime, TimeSpan)
location