Added in API level 31
LightsManager
abstract class LightsManager
| kotlin.Any | |
| ↳ | android.hardware.lights.LightsManager |
The LightsManager class allows control over device lights.
Summary
| Nested classes | |
|---|---|
| abstract |
Encapsulates a session that can be used to control device lights and represents the lifetime of the requests. |
| Public methods | |
|---|---|
| abstract LightState |
getLightState(light: Light)Returns the state of a specified light. |
| abstract MutableList<Light!> |
Returns the lights available on the device. |
| abstract LightsManager.LightsSession |
Creates a new LightsSession that can be used to control the device lights. |
Public methods
getLightState
Added in API level 31
abstract fun getLightState(light: Light): LightState
Returns the state of a specified light.
| Parameters | |
|---|---|
light |
Light: This value cannot be null. |
| Return | |
|---|---|
LightState |
This value cannot be null. |
getLights
Added in API level 31
abstract fun getLights(): MutableList<Light!>
Returns the lights available on the device.
| Return | |
|---|---|
MutableList<Light!> |
A list of available lights This value cannot be null. |
openSession
Added in API level 31
abstract fun openSession(): LightsManager.LightsSession
Creates a new LightsSession that can be used to control the device lights.
| Return | |
|---|---|
LightsManager.LightsSession |
This value cannot be null. |