Added in API level 36

BrightnessListener


interface BrightnessListener

Listener for display brightness changes.

Summary

Public methods
abstract Unit

Called when the display's brightness has changed.

Public methods

onBrightnessChanged

Added in API level 36
abstract fun onBrightnessChanged(brightness: Float): Unit

Called when the display's brightness has changed.

Parameters
brightness Float: the new brightness of the display. Value of 0.0 indicates the minimum supported brightness and value of 1.0 indicates the maximum supported brightness. Value is between 0.0f and 1.0f inclusive