How to detect when power menu is opened (power off, reboot...)

dhj49er

Well-known member

Glax

New member
I also want to know how?+;;;;;; I've done adb permission for viewing the logcat,but i don't know which log is for power menu
(im using Android 11)
 

Jacob L

Moderator (Lawsonator)
I also want to know how?+;;;;;; I've done adb permission for viewing the logcat,but i don't know which log is for power menu
(im using Android 11)
The trigger is called Logcat. In the trigger, type powerLongPress
 

Glax

New member
I don't want to open that, ...... I want a trigger when power menu will open...
Example: when power menu is visible i want to play a music that's it.or whatever i want i can use as like a trigger
Example 2: when power menu visible i want to run macro that time..
I hope you understand now what i want to do...
I want to prevent the power off from thief .
 
Last edited:

Snurre

Well-known member
I know what you mean, therefore it's not just enough to check if the button is pressed because there are other ways power menu can be opened
I don't really know, but how about some read screen content, maybe ?
 

Glax

New member
I know what you mean, therefore it's not just enough to check if the button is pressed because there are other ways power menu can be opened
I don't really know, but how about some read screen content, maybe ?
I don't want to check button 🥲 ,,,,,,i want to trigger when power menu will open,,,,,,if there is multiple way to open power menu who cares.
 

Jacob L

Moderator (Lawsonator)
From the template store, search for 16294, save and enable the macro, launch the power menu and then see what the user log shows. It is different per device. What people are saying about launching the power menu in different ways does indeed matter becuase logcat may not show other launch methods
 

Glax

New member
From the template store, search for 16294, save and enable the macro, launch the power menu and then see what the user log shows. It is different per device. What people are saying about launching the power menu in different ways does indeed matter becuase logcat may not show other launch methods
I figured the log it's> [setShutdownDialogVisibility]

But it's seems like macrodroid can't read this log i used different application for viewing log that's way i find the log....now my question is if macrodroid can't view this log so how ill be able to use?
😟
Exact log➡️ :
OpKeyguardUpdateMonitor(6731): setShutdownDialogVisibility: true, callers= com.android.systemui.globalactions.GlobalActionsDialog.onShow:1416
 

Attachments

  • Screenshot_20230417-135106.jpg
    Screenshot_20230417-135106.jpg
    191.7 KB · Views: 8
Last edited:

Glax

New member
I Did that ages ago...
But it's look like macrodroid don't have debug log reading ability....have a look in this image>
 

Attachments

  • Picsart_23-04-17_16-31-15-156.jpg
    Picsart_23-04-17_16-31-15-156.jpg
    281.2 KB · Views: 6
Last edited:

OscariBot

Active member
I don't want to open that, ...... I want a trigger when power menu will open...
Example: when power menu is visible i want to play a music that's it.or whatever i want i can use as like a trigger
Example 2: when power menu visible i want to run macro that time..
I hope you understand now what i want to do...
I want to prevent the power off from thief .
Well, to me If your major concern is prevent power off from thief... Why bother logcat? There are other ways of doing same thing.
 
Top