Unresolved reference: getSensorList in SensorManager.getSensorList

94 Views Asked by At

I am writing a simple code to find out all available sensors in an Android System. I don't know why I am getting this error. Neither Android docs have mentioned any exception as such that may occur nor I think I am doing any mistake in writing code.

var sensorList = SensorManager.getSensorList(Sensor.TYPE_ALL)

This getSensorList() method is giving me error. What could be the possible reason ?

0

There are 0 best solutions below