2
Declined

Use Sensor.TYPE_LIGHT instead of finding the int value

Hi

I am having difficulty finding the correct sensor int value for the light sensor. All the documentation online refers to Sensor.TYPE_LIGHT.

Is it possible to change the autotools event to use the string (Sensor.TYPE_LIGHT) instead of the int (not sure what it is yet, i cant find it)?

 

Thank you

Peter

1 reply

You can find the int value here: https://developer.android.com/reference/android/hardware/Sensor.html#TYPE_LIGHT 

 

Check the value where it says Constant Value . In this case it's 5.