Display State Off Trigger Doesn't Work as Expected

Post your questions and help other users.

Moderator: Martin

Post Reply
vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Display State Off Trigger Doesn't Work as Expected

Post by vertigo » 25 Jun 2020 00:34

I assumed the Display State (Off) trigger would trigger based on the display turning off, but that's not how it works. Instead, it appears to trigger when the power button is pressed while the display is on. I don't know if it's supposed to be that way, but I assume it is. I'm guessing AM can't actually trigger based on the display state itself, and uses the button presses as a makeshift solution. If that's the case, then so be it, but then the trigger help screen should make that more clear. I ran into the problem when trying to cause a flow to trigger when I leave the camera, whether by switching out of it or by locking the phone, but it was running when I launched the camera due to the double-tap of the power button to do so. The solution was easy, just using a condition to see if that triggered the flow then another to check the state of the display, but it caught me by surprise to have the problem in the first place and took a minute to figure out.

User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

Re: Display State Off Trigger Doesn't Work as Expected

Post by Rafi4 » 25 Jun 2020 05:21

Hi vertigo
Use trigger General Broadcast: and select action
In general broadcast android.intent.action.SCREEN_OFF.
I hope this works.

From record4
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1

vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Re: Display State Off Trigger Doesn't Work as Expected

Post by vertigo » 25 Jun 2020 16:22

Thanks. That does work, which shows it is possible for AM to operate that way, so the Display (Off) trigger should as well. That is, it should use the broadcast for its trigger instead of the power button press.

Post Reply