Sample Header Ad - 728x90

Elegant way for notification when power button pressed

0 votes
1 answer
328 views
I want to display a notification for user via
-send
when power button is pressed. Power button has a special script attached which allows to shutdown only when specified amount of time has passed. In that time when user cannot shutdown the device I want to display a notification which says something like "Please wait...". Problem is that when I put a
-send
command into the script it spams entire screen with that notification because after pressing the button script is executed like 50 times. It is related to power button hardware (I think). So my question is there a way to do it?
Asked by kamil_debski (5 rep)
Dec 13, 2021, 11:02 AM
Last activity: Dec 13, 2021, 06:06 PM