GeofenceHardware.AddGeofence(Int32, GeofenceMonitoringType, GeofenceHardwareRequest, GeofenceHardwareCallback) Method

Definition

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

Boolean

true when the geofence is successfully sent to the hardware for addition.

Attributes

Exceptions

when the geofence request type is not supported.

Remarks

Java documentation for android.hardware.location.GeofenceHardware.addGeofence(int, int, android.hardware.location.GeofenceHardwareRequest, android.hardware.location.GeofenceHardwareCallback).

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.

Applies to