2

A friend of mine recently developed a medical condition that causes sudden shortness of breath, and in one instance, caused her to pass out. In that instance, she said she lost her vision first, so she couldn't make a phone call to anyone.

I found some apps that send emergency messages by pressing a button in the lock screen, but it may be hard to do so without being able to see (though certainly better than trying to punch in a phone number). I was wondering if there was a way to send messages by holding down a physical button for, say, 5 seconds. (Of course, the contacts/message would be preconfigured/preset.) I'm not sure if it's even possible for an app to "hijack" a button's functionality in such a way.

4

tl;dr: I wasn't aware of any such apps and so I've actually written an application that can do this for a university project; the user holds the volume down button for x seconds (default is 3) and a preconfigured emergency message is sent to their chosen contact(s). There are a few problems with getting this functionality however (see below). I haven't made the app available anywhere but could put a version up on the Play Store over the next few days. Will edit this when I do.


The problem I found is that it doesn't work in all possible states the phone could be in, meaning your friend might be trying to use it but will forget to put it in a correct state if they're in a panic. Here's the results of the testing I did, a pass means the emergency SMS was sent:

enter image description here

One test wasn’t applicable because if the screen is off pressing the volume button will turn it back on giving us the first test state.

For the state where the screen was on but phone was locked, the evidence gathering could be activated but only by pressing the volume button repeatedly for the required amount of time.

The reason the activation doesn’t work as intended is because Android only receives one button press when the volume button is held while the screen is locked and so only passes one press to the application. If the volume button is repeatedly pressed then the application is ‘tricked’ into thinking the button is being held constantly because the app checks if the button is being held once a second but the button only needs to have been held once in the last second for it to count.

A positive point about the volume button method is that it uses almost no battery, there isn't any monitoring or polling of the volume button's state.


If you were willing to consider other activation methods I also added the ability to tilt the phone and have it activate the emergency SMS, I found this worked in a lot more states:

enter image description here

I believe it would also be possible to get the Tasker application to do this tilting activation but I don't own it and haven't tried it.

  • Thanks! I'd be happy to test all your listed scenarios on the phones I have available to me: HTC Thunderbolt, Galaxy S3, Galaxy S4, and my friend's phone; and send you the results. Let me know if you'd like to send me an APK or other installation files/instructions. Though, the tilt mode sounds like it could register many false positives (what if the phone's tilted in her pocket or her bag?) Maybe I don't fully understand how it works yet. – Andrew Cheong Jul 23 '13 at 3:37
  • @acheong87 The tilt mode would be, for example, tilting at least 30 degrees down, up, down and up again in under 3 seconds for it to activate, I got a v.low false positive rate. Like I said I'll upload it to the Play Store, I've never done that before and want to try. It will take at least a few days because I'll have to rewrite bits of it, it was designed for domestic violence victims & had to run discretely on the phone, obviously there's no such requirement here. It also does things like monitor location and send it in the text when activated. Fuller description here: redd.it/1eu81e – Peanut Jul 23 '13 at 10:19
  • @acheong87 Just to note I haven't forgotten about this, just getting the app ready is taking much longer than I thought it would! – Peanut Aug 7 '13 at 10:42
  • Thanks for the update! No worries. If you make it you make it, and if not, that's okay too. I was just saying I'd be happy to help test it if you get around to it one day. Good luck. – Andrew Cheong Aug 7 '13 at 10:46
  • @Peanut I just came across your post. My brother has ALS and I am looking for ways to easily have him send emergency text messages. I kno this post was years ago, but is the app available for testing? Thanks! – jay-charles Nov 11 '15 at 12:48
2

Not specifically with the volume buttons, but if you are open for alternatives, Tasker might be able to help out. To fire the emergency task, the following triggers might be feasible:

  • Camera button
  • Long-Search button
  • Gesture (The phone has just been waved around in a particular way)
  • Shake (The device is being physically shaken)

If the device has no camera button, the long-search button being hard to find without vision, this might leave us with the "gesture" and "shake" triggers. To set that up, you can record your "emergency pattern", e.g. "shake twice left-right, then twice up-down".

As task, Tasker offers e.g. "Send SMS" (Send an SMS without user interaction.) So combining action and task, you'd have your "emergency profile": As soon as the shake-pattern is recognized, the emergency SMS would be sent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.