[FREE] BrightnessTools - Set brightness of your phone

As you can see in my blocks, I tried to set different values.
The brightness doesn’t change at all.

1 Like

Did you grant the write settings permission?

I tested it with Companion and this permission is already granted (in Companion):

<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
1 Like

What will happen if you set the Brightness to 0?

As I said:

1 Like

And you should grant it with call Screen.Open System Write Settings
Just tested it in my Virtual Pixel Phone and on my personal phone, it worked when the permission is granted. The get brightness will always work no matter the Write Settings are granted.

Here is a test aia: TestBrightnessTools.aia (25.2 KB)

1 Like

Ah, you should grant it after opening System Write Settingscall Screen.Open System Write Settings.

I tried it on another device beforehand and it worked without opening the System Write Settings (obviously it was already granted there).
Thanks.

1 Like

You should add these blocks to the extension description:

grafik

2 Likes

Thanks for reminding! I will definitely add that :wink:

2 Likes

If i want to return brightness
what i do
blocks(1)

BrightnessTools.Brightness
image

Could you please give a working example to return the screen brightness to what it was

the block he showed returns the current brightness

1 Like

you might want to store the previous brightness in a variable to be able to set it back later
Taifun

1 Like

any way , how i can do it ?

how many times to tell see this block

You do not understand what I mean
I want when the user presses the 1 button it increases the brightness level to the maximum
When pressing the button 2, it returns the brightness level to what it was.

blocks(2)
Could I do it like this?

it looks like you have overseen this suggestion

Taifun

1 Like

It’s really an awesome extension!!

2 Likes