Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dial number without prompt

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.

like image 355
Pitney Avatar asked Nov 28 '09 05:11

Pitney


1 Answers

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.

like image 145
Artem Russakovskii Avatar answered Oct 29 '22 23:10

Artem Russakovskii