Share via


SensorManager.GetSensorList(SensorType) Method

Definition

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

[Android.Runtime.Register("getSensorList", "(I)Ljava/util/List;", "GetGetSensorList_IHandler")]
public virtual System.Collections.Generic.IList<Android.Hardware.Sensor>? GetSensorList (Android.Hardware.SensorType type);
[<Android.Runtime.Register("getSensorList", "(I)Ljava/util/List;", "GetGetSensorList_IHandler")>]
abstract member GetSensorList : Android.Hardware.SensorType -> System.Collections.Generic.IList<Android.Hardware.Sensor>
override this.GetSensorList : Android.Hardware.SensorType -> System.Collections.Generic.IList<Android.Hardware.Sensor>

Parameters

type
SensorType

of sensors requested

Returns

a list of sensors matching the asked type.

Attributes

Remarks

Use this method to get the list of available sensors of a certain type. Make multiple calls to get sensors of different types or use android.hardware.Sensor#TYPE_ALL Sensor.TYPE_ALL to get all the sensors. Note that the android.hardware.Sensor#getName() is expected to yield a value that is unique across any sensors that return the same value for android.hardware.Sensor#getType().

<p class="note"> NOTE: Both wake-up and non wake-up sensors matching the given type are returned. Check Sensor#isWakeUpSensor() to know the wake-up properties of the returned Sensor. </p>

Java documentation for android.hardware.SensorManager.getSensorList(int).

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

See also