Pixel 8 pro com.android.pixeldisplayservice

mreyes

New member
Hi,

I'm trying to create a macro that will
  • Enable auto-rotate
  • Set screen brightness to 100%
When the camera is launched and
  • Disable auto-rotate
  • Enable auto-brightness
When the camera app is closed.

It's working for the most part but I've got an issue where it would keep toggling between the 2 states (full brightness/auto-brightness) due to com.android.pixeldisplayservice going in the foreground (debugged by displaying the foreground app name).

Does anyone have an idea for a solution to this?
 

Attachments

  • Screenshot_20231111-092539.png
    Screenshot_20231111-092539.png
    294.2 KB · Views: 4

Endercraft

Moderator (& bug finder :D)
This is caused because MacroDroid goes in foreground for an instant, use a macro not invoked for 1 or 2 seconds contraint on the whole macro.
 

mreyes

New member
Oh cool, thanks, this worked, but isn't consistent. It's not flickering anymore but I noticed that there are times when the app close action doesn't get triggered.

I've attached my macro.
 

Attachments

  • Screenshot_20231111-133820.png
    Screenshot_20231111-133820.png
    454.1 KB · Views: 5

Endercraft

Moderator (& bug finder :D)
Yes unfortunately that's something that you have to deal with.
You can set a regular interval trigger to check the foreground app and change the settings accordingly (it won't be instant though).
 

mreyes

New member
Yes unfortunately that's something that you have to deal with.
You can set a regular interval trigger to check the foreground app and change the settings accordingly (it won't be instant though).
Ahh, all good. Thank you so much for the help and insights, just starting out with macrodroid.
 

Dm114

Well-known member
Oh cool, thanks, this worked, but isn't consistent. It's not flickering anymore but I noticed that there are times when the app close action doesn't get triggered.

I've attached my macro.
Unfortunately, as @Endercraft said, for some reason App Closed triggers don't always fire as they should. What you can do is to:
- set a boolean variable to True when your camera app starts running (trigger fired)
- consider your camera app if not in foreground anymore when any another app is launched (trigger fired) AND the boolean variable is True.
 

mreyes

New member
Just wanna post an update, tried the 5.38 beta, it's working perfectly without having to add the "macro not invoked" constraint.
 
Last edited:

Endercraft

Moderator (& bug finder :D)
Just wanna post an update, tried the 5.38 beta, it's working perfectly without having to add the "macro not invoked" constraint.
Interesting, maybe it's a built-in function now. I don't remember seeing this in the changelog..
 
Top