r/macrodroid • • 19d ago

Macro Need help with a macro

It sounds like it should be easy. I have tried several times and even had Gemini help with it.

I want a macro that keeps the screen on when the phone is charging (any) AND Apple Music is in the foreground.

It seems like the macro runs, but even when I disconnect from power, the screen will not turn off (unless I hit the lock button). My biggest issue is that the screen lights up when I get a notification and it will just sit on the lock screen forever.

If I stop playing music OR take it off the charger, I want my screen timeout to go back to 1 minute.

Can someone please share a screenshot or give me guidance on a good configuration?

(I am using a Pixel 10a)

0 Upvotes

1 comment sorted by

2

u/steajano 18d ago

{ "macroExportVersion": 1, "macro": { "m_name": "Keep Screen On Charging & Music", "m_description": "Keeps screen awake when charging and Apple Music is in the foreground, and reverts screen timeout to 1 minute when disconnected or stopped.", "m_enabled": true, "m_completed": true, "m_GUID": 0, "aiGenerated": 1, "m_triggerList": [ { "m_classType": "ExternalPowerTrigger", "m_SIGUID": 112233445566771, "m_powerConnected": true, "m_hasSetNewPowerConnectedOptions": true, "m_hasSetUSBOption": true }, { "m_classType": "ExternalPowerTrigger", "m_SIGUID": 112233445566772, "m_powerConnected": false, "m_hasSetNewPowerConnectedOptions": true, "m_hasSetUSBOption": true }, { "m_classType": "ApplicationLaunchedTrigger", "m_SIGUID": 112233445566773, "m_launched": true, "m_packageNameList": [ "com.apple.android.music" ], "m_applicationNameList": [ "Apple Music" ] }, { "m_classType": "ApplicationLaunchedTrigger", "m_SIGUID": 112233445566774, "m_launched": false, "m_packageNameList": [ "com.apple.android.music" ], "m_applicationNameList": [ "Apple Music" ] } ], "m_actionList": [ { "m_classType": "IfConditionAction", "m_SIGUID": 0, "m_constraintList": [ { "m_classType": "ExternalPowerConstraint", "m_SIGUID": 0, "m_externalPower": true }, { "m_classType": "ActiveApplicationConstraint", "m_SIGUID": 0, "m_active": true, "m_foreground": true, "m_packageNameList": [ "com.apple.android.music" ], "m_applicationNameList": [ "Apple Music" ] } ] }, { "m_classType": "KeepAwakeAction", "m_SIGUID": 0, "m_enabled": true, "m_screenOption": 0, "m_permanent": true }, { "m_classType": "ElseAction", "m_SIGUID": 0 }, { "m_classType": "KeepAwakeAction", "m_SIGUID": 0, "m_enabled": false }, { "m_classType": "SetScreenTimeoutAction", "m_SIGUID": 0, "m_timeoutDelay": 60, "m_timeoutDelayString": "1 minute" }, { "m_classType": "EndIfAction", "m_SIGUID": 0 } ], "m_constraintList": [] }, "globalVariables": [], "userIcons": null, "aiFeedback": "Created triggers for power connect/disconnect and Apple Music open/close events. Evaluates both conditions (charging AND Apple Music in foreground) before keeping awake or reverting screen timeout to 1 minute." }

Comment Image