Dela via


GeofenceHardware Class

Definition

This class handles geofences managed by various hardware subsystems.

[Android.Runtime.Register("android/hardware/location/GeofenceHardware", DoNotGenerateAcw=true)]
public sealed class GeofenceHardware : Java.Lang.Object
[<Android.Runtime.Register("android/hardware/location/GeofenceHardware", DoNotGenerateAcw=true)>]
type GeofenceHardware = class
    inherit Object
Inheritance
GeofenceHardware
Attributes

Remarks

This class handles geofences managed by various hardware subsystems. It contains the public APIs that is needed to accomplish the task.

The APIs should not be called directly by the app developers. A higher level api which abstracts the hardware should be used instead. All the checks are done by the higher level public API. Any needed locking should be handled by the higher level API.

There are 3 states associated with a Geofence: Inside, Outside, Unknown. There are 3 transitions: #GEOFENCE_ENTERED, #GEOFENCE_EXITED, #GEOFENCE_UNCERTAIN. The APIs only expose the transitions.

Inside state: The hardware subsystem is reasonably confident that the user is inside the geofence. Outside state: The hardware subsystem is reasonably confident that the user is outside the geofence Unknown state: Unknown state can be interpreted as a state in which the monitoring subsystem isn't confident enough that the user is either inside or outside the Geofence. If the accuracy does not improve for a sufficient period of time, the #GEOFENCE_UNCERTAIN transition would be triggered. If the accuracy improves later, an appropriate transition would be triggered. The "reasonably confident" parameter depends on the hardware system and the positioning algorithms used. For instance, #MONITORING_TYPE_GPS_HARDWARE uses 95% as a confidence level.

Java documentation for android.hardware.location.GeofenceHardware.

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.

Fields

GeofenceEntered
Obsolete.

The constant to indicate that the user has entered the geofence.

GeofenceErrorIdExists
Obsolete.

The constant used to indicate that the geofence id already exists.

GeofenceErrorIdUnknown
Obsolete.

The constant used to indicate that the geofence id is unknown.

GeofenceErrorInvalidTransition
Obsolete.

The constant used to indicate that the transition requested for the geofence is invalid.

GeofenceErrorTooManyGeofences
Obsolete.

The constant used to indicate that too many geofences have been registered.

GeofenceExited
Obsolete.

The constant to indicate that the user has exited the geofence.

GeofenceFailure
Obsolete.

The constant used to indicate that the geofence operation has failed.

GeofenceSuccess
Obsolete.

The constant used to indicate success of the particular geofence call

GeofenceUncertain
Obsolete.

The constant to indicate that the user is uncertain with respect to a geofence.

MonitorCurrentlyAvailable
Obsolete.

Constant to indicate that the monitoring system is currently available for monitoring geofences.

MonitorCurrentlyUnavailable
Obsolete.

Constant to indicate that the monitoring system is currently unavailable for monitoring geofences.

MonitoringTypeGpsHardware
Obsolete.

Constant for geofence monitoring done by the GPS hardware.

MonitorUnsupported
Obsolete.

Constant to indicate that the monitoring system is unsupported for hardware geofence monitoring.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

AddGeofence(Int32, GeofenceMonitoringType, GeofenceHardwareRequest, GeofenceHardwareCallback)

Creates a circular geofence which is monitored by subsystems in the hardware.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetMonitoringTypes()

Returns all the hardware geofence monitoring systems which are supported

GetStatusOfMonitoringType(GeofenceMonitoringType)

Returns current status of a hardware geofence monitoring system.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
PauseGeofence(Int32, GeofenceMonitoringType)

Pauses the monitoring of a geofence added by #addGeofence call.

RegisterForMonitorStateChangeCallback(GeofenceMonitoringType, GeofenceHardwareMonitorCallback)

Register the callback to be notified when the state of a hardware geofence monitoring system changes.

RemoveGeofence(Int32, GeofenceMonitoringType)

Removes a geofence added by #addGeofence call.

ResumeGeofence(Int32, GeofenceMonitoringType, GeofenceTransition)

Resumes the monitoring of a geofence added by #pauseGeofence call.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterForMonitorStateChangeCallback(GeofenceMonitoringType, GeofenceHardwareMonitorCallback)

Unregister the callback that was used with #registerForMonitorStateChangeCallback to notify when the state of the hardware geofence monitoring system changes.

UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to