12

I'm trying to write a function for the Android platform that will allow me to call 911 without any sort of prompt.

I have already added the permission android.permission.CALL_PRIVILEGED. I just need a function that will dial 911 at the press of a button in my options menu.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Pitney
  • 121
  • 1
  • 3
  • 3
    I can think of a few really good uses of an app like this, actually. "Why on earth...?" isn't a helpful comment. – marcc Nov 28 '09 at 05:49
  • Are you using the ACTION_CALL intent? Does it work? – Josh Lee Nov 28 '09 at 06:08
  • 3
    I would consider this before rolling it out. You don't want to make it TOO easy for users to dial 911. There are already enough accidental 911 calls. If a user accidentally dials 911 once or twice they'll probably uninstall your app. It might also be nice to add a note telling the user not to hang up on a 911 call, stay on the line and tell them it's a mistake. A couple of pages that discuss this problem: http://www.911dispatch.com/911/911_misdials.html http://www.fcc.gov/cgb/consumerfacts/unint911.html – Nate C-K Nov 29 '09 at 18:55

1 Answers1

17

According to the API, ACTION_CALL will do what you need but not to emergency numbers, while ACTION_DIAL will display a dialer with the dial prompt but allows to call emergency numbers.

I'm afraid there is no way to do what you want, for a good reason - to prevent misdials to emergency services. It's a precautionary measure.

Artem Russakovskii
  • 21,516
  • 18
  • 92
  • 115