Display an Android Sensors List

后端 未结 4 1869
梦谈多话
梦谈多话 2021-02-01 18:46

I\'m trying to display a list of available sensors but it\'s like there are not!
I was thinking that it was because of the emulator, but i tried it on the phone and the re

4条回答
  •  无人及你
    2021-02-01 19:25

    getSensorList (int type) of SensorManager class gives a list of sensors ==> List. (To get the list of available sensors of a certain type.)

    Use Sensor.TYPE_ALL to get all the sensors. Make multiple calls to get sensors of different types.

提交回复
热议问题