Manage LG G6 AlwaysOnDisplay with Automagic

Post your questions and help other users.

Moderator: Martin

Post Reply
handyE
Posts: 2
Joined: 22 Dec 2017 21:16

Manage LG G6 AlwaysOnDisplay with Automagic

Post by handyE » 01 Jan 2018 20:19

Hi,

I am trying to manage the AOD of my LG G6 with Auotmagic. It should only show something (switch on) when new messages are received.
With tasker this seems possible (see here), but I want to do this using automagic only.
Seems like I have to do something with "android.provider.Settings$System", setting "enable_ext_display_on_lcd_off" to 1.
But I do not know how to do it. My knowledge in android-programming is also limited, sorry. I hope, someone can give me some hints...

Thanks very much!

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Manage LG G6 AlwaysOnDisplay with Automagic

Post by Desmanto » 02 Jan 2018 03:27

That's a clever way for setting it thru tasker. He wanna avoid using additonal plugin to set the setting. But he must have granted tasker write secure setting permission.

Automagic do it too, without java. I tried with java, but can't make it right. Hope someone can help me with it, i still curious how it can be done using java.

First, you must have granted automagic write secure permission thru adb in PC. if you are rooted, then you can skip this.

Use action Set system setting.
Category : System
Name : enable_ext_display_on_lcd_off
Value : 1
Or 0 if you want to turn it off. Check I have verified the setting. For name, to make sure you don't mistype it, simply select it from the ellipsis.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

handyE
Posts: 2
Joined: 22 Dec 2017 21:16

Re: Manage LG G6 AlwaysOnDisplay with Automagic

Post by handyE » 07 Jan 2018 11:57

@Desmanto: Thank you very much for your quick and informative reply. I tried that and setting this option with automagic was no problem.

But now I found out that I don't have a setting named "enable_ext_display_on_lcd_off".
I'm sure your suggestion works perfectly on stock rom, but I'm on LineageOS and there it doesn't. But this seems another (different) problem.
I think I will have to use some app like "Always On AMOLED", but then there is a huge battery drain.
Eventually, there is a way to only enable the app if a new message has arrived (with automagic??) or let automagic draw\write something to the AOD directly if that is possible?

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Manage LG G6 AlwaysOnDisplay with Automagic

Post by Desmanto » 07 Jan 2018 13:20

But you do have the toggle to turn it on right? If you have it, you can use Control UI to tap the AOD toggle.
But Control UI only works when the screen is on, so maybe there is some distraction if you use it.
Maybe the AOD was renamed to something else in LineageOS. You gotta try to find it.

Using additional app for something like this, tends to drain a lot of battery. The built-in solution always better, since it is built into the ROM and probably kernel too.

If you want to enable it only when there is a message, you can use a similar concept to missed called reminder here : viewtopic.php?f=5&t=7181
Except, you only check for the message notif (you can add the missed call too).
But I don't know if it is possible to enable/disable the app directly from automagic. Maybe you can use launch app and kill app.

AOD is vendor-specific implementation. Most of the time, automagic can't access their intent directly.
Probably need logcat to log what happen during the activation of the always on display, then mimic the behaviour.
But it is very difficult to do it.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply