Android defines a user space C abstraction interface for LED hardware. The interface header is defined in hardware/libhardware/include/hardware/lights.h
.In order to integrate LEDs with Android you need to build a shared library that implements this interface. The types of logical lights currently supported by Android include:
- Backlight
- Keyboard
- Buttons
- Battery
- Notifications
- Attention
Building a Lights Library
To implement a Lights driver, create a shared library that implements the interface defined in lights.h
. You must name your shared library liblights.so
so that it will get loaded from /system/lib
at runtime.
Interface
Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here.
lights.h File Reference
Go to the source code of this file.