GeofenceHardware.AddGeofence(Int32, GeofenceMonitoringType, GeofenceHardwareRequest, GeofenceHardwareCallback) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a circular geofence which is monitored by subsystems in the hardware.
[Android.Runtime.Register("addGeofence", "(IILandroid/hardware/location/GeofenceHardwareRequest;Landroid/hardware/location/GeofenceHardwareCallback;)Z", "")]
public bool AddGeofence (int geofenceId, Android.Hardware.Location.GeofenceMonitoringType monitoringType, Android.Hardware.Location.GeofenceHardwareRequest? geofenceRequest, Android.Hardware.Location.GeofenceHardwareCallback? callback);
[<Android.Runtime.Register("addGeofence", "(IILandroid/hardware/location/GeofenceHardwareRequest;Landroid/hardware/location/GeofenceHardwareCallback;)Z", "")>]
member this.AddGeofence : int * Android.Hardware.Location.GeofenceMonitoringType * Android.Hardware.Location.GeofenceHardwareRequest * Android.Hardware.Location.GeofenceHardwareCallback -> bool
Parameters
- geofenceId
- Int32
The id associated with the geofence.
- monitoringType
- GeofenceMonitoringType
The type of the hardware subsystem that should be used to monitor the geofence.
- geofenceRequest
- GeofenceHardwareRequest
The GeofenceHardwareRequest object associated with the
geofence.
- callback
- GeofenceHardwareCallback
GeofenceHardwareCallback that will be use to notify the
transition.
Returns
true when the geofence is successfully sent to the hardware for addition.
- Attributes
Exceptions
when the geofence request type is not supported.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.