SensorManager SensorManager Class

Definition

[Android.Runtime.Register("android/hardware/SensorManager", ApiSince=1, DoNotGenerateAcw=true)]
public abstract class SensorManager : Java.Lang.Object
type SensorManager = class
    inherit Object
Inheritance
SensorManagerSensorManager
Attributes

Remarks

Android platform documentation

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.

Constructors

SensorManager(IntPtr, JniHandleOwnership) SensorManager(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

GravityDeathStarI GravityDeathStarI

Gravity (estimate) on the first Death Star in Empire units (m/s^2)

GravityEarth GravityEarth

Earth's gravity in SI units (m/s^2)

GravityJupiter GravityJupiter

Jupiter's gravity in SI units (m/s^2)

GravityMars GravityMars

Mars' gravity in SI units (m/s^2)

GravityMercury GravityMercury

Mercury's gravity in SI units (m/s^2)

GravityMoon GravityMoon

The Moon's gravity in SI units (m/s^2)

GravityNeptune GravityNeptune

Neptune's gravity in SI units (m/s^2)

GravityPluto GravityPluto

Pluto's gravity in SI units (m/s^2)

GravitySaturn GravitySaturn

Saturn's gravity in SI units (m/s^2)

GravitySun GravitySun

Sun's gravity in SI units (m/s^2)

GravityTheIsland GravityTheIsland

Gravity on the island

GravityUranus GravityUranus

Uranus' gravity in SI units (m/s^2)

GravityVenus GravityVenus

Venus' gravity in SI units (m/s^2)

LightCloudy LightCloudy

luminance under a cloudy sky in lux

LightFullmoon LightFullmoon

luminance at night with full moon in lux

LightNoMoon LightNoMoon

luminance at night with no moon in lux

LightOvercast LightOvercast

luminance under an overcast sky in lux

LightShade LightShade

luminance in shade in lux

LightSunlight LightSunlight

luminance of sunlight in lux

LightSunlightMax LightSunlightMax

Maximum luminance of sunlight in lux

LightSunrise LightSunrise

luminance at sunrise in lux

MagneticFieldEarthMax MagneticFieldEarthMax

Maximum magnetic field on Earth's surface

MagneticFieldEarthMin MagneticFieldEarthMin

Minimum magnetic field on Earth's surface

PressureStandardAtmosphere PressureStandardAtmosphere

Standard atmosphere, or average sea-level pressure in hPa (millibar)

StandardGravity StandardGravity

Standard gravity (g) on Earth.

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
IsDynamicSensorDiscoverySupported IsDynamicSensorDiscoverySupported
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
PeerReference PeerReference Inherited from Object
Sensors Sensors
ThresholdClass ThresholdClass

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

ThresholdType ThresholdType

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

Methods

CancelTriggerSensor(TriggerEventListener, Sensor) CancelTriggerSensor(TriggerEventListener, Sensor)

Cancels receiving trigger events for a trigger sensor.

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
CreateDirectChannel(HardwareBuffer) CreateDirectChannel(HardwareBuffer)
CreateDirectChannel(MemoryFile) CreateDirectChannel(MemoryFile)
Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
Flush(ISensorEventListener) Flush(ISensorEventListener)

Flushes the FIFO of all the sensors registered for this listener.

FromContext(Context) FromContext(Context)
GetAltitude(Single, Single) GetAltitude(Single, Single)

Computes the Altitude in meters from the atmospheric pressure and the pressure at sea level.

GetAngleChange(Single[], Single[], Single[]) GetAngleChange(Single[], Single[], Single[])

Helper function to compute the angle change between two rotation matrices.

GetDefaultSensor(SensorType) GetDefaultSensor(SensorType)

Use this method to get the default sensor for a given type.

GetDefaultSensor(SensorType, Boolean) GetDefaultSensor(SensorType, Boolean)

Return a Sensor with the given type and wakeUp properties.

GetDynamicSensorList(SensorType) GetDynamicSensorList(SensorType)
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
GetInclination(Single[]) GetInclination(Single[])

Computes the geomagnetic inclination angle in radians from the inclination matrix I returned by GetRotationMatrix(Single[], Single[], Single[], Single[]).

GetOrientation(Single[], Single[]) GetOrientation(Single[], Single[])

Computes the device's orientation based on the rotation matrix.

GetQuaternionFromVector(Single[], Single[]) GetQuaternionFromVector(Single[], Single[])

Helper function to convert a rotation vector to a normalized quaternion.

GetRotationMatrix(Single[], Single[], Single[], Single[]) GetRotationMatrix(Single[], Single[], Single[], Single[])
GetRotationMatrixFromVector(Single[], Single[]) GetRotationMatrixFromVector(Single[], Single[])

Helper function to convert a rotation vector to a rotation matrix.

GetSensorList(SensorType) GetSensorList(SensorType)

Use this method to get the list of available sensors of a certain type.

JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
RegisterDynamicSensorCallback(SensorManager+DynamicSensorCallback) RegisterDynamicSensorCallback(SensorManager+DynamicSensorCallback)
RegisterDynamicSensorCallback(SensorManager+DynamicSensorCallback, Handler) RegisterDynamicSensorCallback(SensorManager+DynamicSensorCallback, Handler)
RegisterListener(ISensorEventListener, Sensor, SensorDelay) RegisterListener(ISensorEventListener, Sensor, SensorDelay)

Registers a ISensorEventListener for the given sensor at the given sampling frequency.

RegisterListener(ISensorEventListener, Sensor, SensorDelay, Handler) RegisterListener(ISensorEventListener, Sensor, SensorDelay, Handler)

Registers a ISensorEventListener for the given sensor.

RegisterListener(ISensorEventListener, Sensor, SensorDelay, Int32) RegisterListener(ISensorEventListener, Sensor, SensorDelay, Int32)

Registers a ISensorEventListener for the given sensor at the given sampling frequency and the given maximum reporting latency.

RegisterListener(ISensorEventListener, Sensor, SensorDelay, Int32, Handler) RegisterListener(ISensorEventListener, Sensor, SensorDelay, Int32, Handler)

Registers a ISensorEventListener for the given sensor at the given sampling frequency and the given maximum reporting latency.

RegisterListener(ISensorListener, Int32) RegisterListener(ISensorListener, Int32)

Registers a listener for given sensors.

RegisterListener(ISensorListener, Int32, SensorDelay) RegisterListener(ISensorListener, Int32, SensorDelay)

Registers a SensorListener for given sensors.

RemapCoordinateSystem(Single[], Axis, Axis, Single[]) RemapCoordinateSystem(Single[], Axis, Axis, Single[])
RequestTriggerSensor(TriggerEventListener, Sensor) RequestTriggerSensor(TriggerEventListener, Sensor)

Requests receiving trigger events for a trigger sensor.

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

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

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterDynamicSensorCallback(SensorManager+DynamicSensorCallback) UnregisterDynamicSensorCallback(SensorManager+DynamicSensorCallback)
UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
UnregisterListener(ISensorEventListener) UnregisterListener(ISensorEventListener)

Unregisters a listener for all sensors.

UnregisterListener(ISensorEventListener, Sensor) UnregisterListener(ISensorEventListener, Sensor)

Unregisters a listener for the sensors with which it is registered.

UnregisterListener(ISensorListener) UnregisterListener(ISensorListener)

Unregisters a listener for all sensors.

UnregisterListener(ISensorListener, Int32) UnregisterListener(ISensorListener, Int32)

Unregisters a listener for the sensors with which it is registered.

Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

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

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to