Hi there! Today I am going to publish my third extension - BrightnessTools
A simple extension to set your brightness!
Raises when error occurred
Triggered when detected any brightness or adaptive change. The param "changed" indicate what has change.
Check if modify system setting permission is granted.
Returns: Number (int)
Get Max brightness of user's phone. If max brightness not found, return 255.
Note: Android states that the maximum value should be 255.
However, different brands of phones have different settings, like some Xiaomi phones have a maximum of 4000.
|Register the listener for Changed|
|Show screen for controlling which apps are allowed to write/modify system settings.|
Set the brightness of user's phone. Minimum value is 0.
Set brightness to adaptive or non-adaptive. Adaptive if true, otherwise non-adaptive.
com.watermelonice.BrightnessTools.aix (16.3 KB)
com.watermelonice.BrightnessTools.aix (14.0 KB)
com.watermelonice.BrightnessTools.aix (10.7 KB)
TestBrightnessExt.aia (27.4 KB)
- As the modify settings permission might be greyed out sometimes, now it would enable that back.
- You don’t need
ActivityStarterto grant the permission anymore. Instead, you can use the
- Big update! Added Listener for brightness and adaptive change
- Optimized the code
This extension will only be distributed in Kodular and AI2 communities. Reuploading my work is not allowed.
You need to grant WRITE_SETTINGS permission. For more please see this post. You can use either the method from Screen or use the
OpenWriteSettingsScreendirectly from my extension. Please note that only the Android version starting from 6.0 needs this permission. At the lower versions, it should be granted when the app is installed.
The intention of this extension is to change the brightness of the phone, not just the app. If you want to change the brightness of that app without permission, please refer to Requesting extension for app brightness without requiring permissions - #9 by Mohamed_Tamer