Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

If my touchscreen Android phone gets smashed I expect that it can happen that only touchscreen is broken (as it seems to be the most fragile part) while the device itself able to function somehow; and I maybe need to call somewhere using only hardware buttons (without screen at all).

Are there any programs to place and/or answer [emergency] calls by entering some pattern of hardware buttons without using screen as input or output? This can also be helpful when you are using the device in frost, in gloves, etc. so using touchscreen becomes problematic.

Having wet/cold/cracked_screen phone and not being able to call for help just because of touchscreen is not working can be unpleasant. With hardware buttons you can type the "sos code" sometimes even if both your and your phone's HP is low...

My device is SE Xperia X10, but I expect the thing to work one way or another with all devices with at least 1 hardware button.

share|improve this question
    
Maybe try to implement the application for rooted devices that will monitor /dev/input/... ? Is it easy to call 112 (directly, not showing any 'press here to call') from API? –  Vi0 Sep 26 '12 at 9:31
add comment

3 Answers

I started implementing my own solution for my device.

Here (source) is a program that (started as root) will allow you to start shell scripts using series of button presses. Currently having started this monitor ( andrhard 66 /h/andrhard < /dev/input/event2&) I can easily toggle the flashlight without unlocking the phone (using /sys/class/leds/lv5219lg:fled/brightness)

Now the problems is how to call/answer from shell scripts...

share|improve this answer
add comment

This blog has a simple way of initiating a call via the command line. service call phone 2 s16 "+18001231234". Combine that with Vi0's answer, and you could have a script to dial a phone number by pressing the button. I haven't tested this to see if dialing 911 would work, but I don't see why not (unless Android specifically disallows that).

share|improve this answer
    
I'll try (with neutral number). How to really test an emergency 112 call without actual emergency? Is aborting a 112 call immediately when you see it is not rejected by Android (before the beeps even started) OK? –  Vi0 Nov 29 '12 at 16:46
    
How do you think: will an normal installable "apk" program that sets up this scheme (my "andrhard" program + this method) be useful for other users? –  Vi0 Nov 29 '12 at 16:53
    
I would say it is useful. Even if someone doesn't want to use it for 911, they could use it for something else. If you had a simple program that lets the user define button presses, then define a command to run, it would be very useful. –  Stephen Schrauger Nov 29 '12 at 16:57
    
Currently I just create scripts with special names, like "73" (volume up) - turn on LED; "72" (volume down) - turn off LED; "9ee59ee5" (back, menu, back, menu) - do something more tricky, like calling somewhere. Numbers are hex codes from /dev/input/ file. File not found => no action assigned. If it'll be an android application, it will be more user-friendly, of course. –  Vi0 Nov 29 '12 at 17:14
add comment

In phones with cyanogenmod ROM you have voice dialer facility. Launching it will vibrate the phone with a beep informing you that it is ready to receive your voice input. Speaking to it like "Call John" or "Call 911" etc will make the device to call.

To enable this to work without the touchscreen you may have to configure the hardware keys. To do so, go to Settings->System->Hardware keys. Enable the custom actions and you can configure the search key's long press event for launching voice dialer.

share|improve this answer
    
Both not convenient and not reliable in case of emergency. (BTW will this work with locked screen?). Also can't start a call preserving silence... I think the Plain Old Hardware Button is the best and most reliable way sometimes. –  Vi0 Sep 26 '12 at 9:25
    
Nope, sorry this will not work with screen locked - didn't realize it :( –  Narayanan Sep 26 '12 at 9:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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