Is there a way to know the number of LEDs an android device supports . For eg certain device support notification and charging LEDs and some devices support only charging LEDs . Is there a way for an app to know the number of LEDs present in the device (Similar to APIs which tell how many cameras are present in the Android device )
Asked
Active
Viewed 243 times
2 Answers
2
Is there a way to know the number of LEDs an android device supports
No, sorry.
Is there a way for an app to know the number of LEDs present in the device
No, sorry.

CommonsWare
- 986,068
- 189
- 2,389
- 2,491
0
Well short of 100% reliable, but you could often derive some clues by looking for nodes in /sys/class/leds. You won't have permission to set them through that interface though. And interpreting what you find there may take some experience. And while this is typically how they are setup, it is not the only way that a manufacturer could choose to implement them.
Building a database of devices might be another option.

Chris Stratton
- 39,853
- 6
- 84
- 117