Trigger on Power button pressed

Post your questions and help other users.

Moderator: Martin

Post Reply
Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Trigger on Power button pressed

Post by Wibbly » 18 Apr 2016 10:46

Is there a trigger that can be built to fire when the Power button is pressed (short), even when the phone is locked and unrooted?

I'm thinking this could be used as a "Panic Button" for a flow that sends alerts when an elderly person needs help - better than having to unlock the phone and find/press a widget.

Idea would be that the power button would have to be pressed x times in succession to fire off the alert (SMS and/or email to selcted contacts).

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: Trigger on Power button pressed

Post by Wibbly » 18 Apr 2016 11:05

I will also try one of these
http://www.ebay.co.uk/itm/222088944710

Hoping pressing the button will be detectable directly by Automagic as some kind of media related event...

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Trigger on Power button pressed

Post by Martin » 18 Apr 2016 18:49

Detecting the power button usually requires a rooted device. You could try to detect screen on/off events in response to the power button.
The button of a wired headset and also presses of a Pressy-like button can often be detected with trigger Media Button Event. Use action Reregister Media Button Receiver when an audio player handles the button instead of Automagic.

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: Trigger on Power button pressed

Post by Wibbly » 18 Apr 2016 20:06

Thanks Martin

Post Reply