View Single Post
      06-16-2019, 07:34 AM   #2301
haxx94
New Member
2
Rep
24
Posts

Drives: BMW 320d f30
Join Date: Oct 2018
Location: Italy

iTrader: (0)

Quote:
Originally Posted by __fred__ View Post
I've got another present for you:

The brightness is controllable through an android intent. Now it's a bit tricky, because its a toggle, that toggles between the 4 brightness levels:

0 = 0% brightness
1 = 33% brightness
2 = 66% brightness
3 = 100% brightness.

The intent is sent by the status bar when the button is pressed in the function area of the drop down menu. But you can ofcourse send it programmatically.

The intent is named:

com.android.quicksetting.BROADCAST

and it has extra string data attached:

msg "backlight"

You can probably toggle it from adb with the following command:

Code:
adb shell am broadcast -a com.android.quicksetting.BROADCAST 
--es msg "backlight"
Now, you don't want to do this from adb, but you could also do it with e.g. Tasker

Remember that you probably have to send multiple intents to toggle the levels with a bit of delay in between. I will create a new version of EventCenter.apk that will directly control the brightness level through an intent, but for now, this is already available.
I have to try this commands and do a tasker routine, thanks!
Please let me know when you create the eventCenter.apk that will directly control the brightness
Appreciate 0