On Android, there is a global system-wide brightness setting, and each app has its own brightness setting that can optionally override the global setting. It is possible to set either of these values with this API. On iOS, the system brightness setting cannot be changed programmatically; instead, any changes to the screen brightness will persist until the device is locked or powered off.
Gets the current brightness level of the device's main screen.
A Promise that is resolved with a number between 0 and 1, inclusive, representing the current screen brightness.
Sets the current screen brightness. On iOS, this setting will persist until the device is locked, after which the screen brightness will revert to the user's default setting. On Android, this setting only applies to the current activity; it will override the system brightness value whenever your app is in the foreground.
brightnessValue (number) - A number between 0 and 1, inclusive, representing the desired screen brightness.
A Promise that is resolved when the brightness has been successfully set.