Dial an emergency number

Quickly share your Android Code Snippets here...

Dial an emergency number

Postby eugeniuskr » Wed Aug 12, 2009 3:50 pm

Hi, anybody.

My question is

How can i dial an emergency number, for example 911?

i made applciation, that can dial number, but not "emergency" one.

if change it to "9111", all works fine, but not "911".

i've found following permissions:
String CALL_PHONE Allows an application to initiate a phone call without going through the Dialer user interface for the user to confirm the call being placed.
String CALL_PRIVILEGED Allows an application to call any phone number, including emergency numbers, without going through the Dialer user interface for the user to confirm the call being placed.

i tried to use CALL_PRIVILEGED, nothing helps. Also, somewhere i've found following line:
dialling emergency services isn’t available to third party applications

I need to call emergency numbers too, or how can i get denied phone numbers and show a messagebox to say:
"thanks to android developers. you can't use emergancy numbers in this application" ?

sorry for my poor english
eugeniuskr
Freshman
Freshman
 
Posts: 9
Joined: Mon Jun 22, 2009 12:27 pm

Top

Postby Draffodx » Wed Jan 20, 2010 1:31 pm

hi eugeniuskr,

Did you have any look with this?

As far as I know Android deals with emergency calls itself, you can call an emergency number from your application but it will have to go through the native dialler.

You cant trap and block an emergency number as this would be deemed malicious as the phone being able to dial emergency numbers is important, blocking them would in fact be illegal in some countries.

You also cant call an emergency number with the user knowing as this would also be deemed malicious, for example an app could re ring emergency numbers without the user knowing and get the user in trouble with emergency services
Draffodx
Master Developer
Master Developer
 
Posts: 205
Joined: Wed Nov 12, 2008 2:31 pm

Postby eugeniuskr » Wed Jan 20, 2010 2:34 pm

I was trying to call from my application through native dialer, it doesn't allow. I didn't find any solution.
eugeniuskr
Freshman
Freshman
 
Posts: 9
Joined: Mon Jun 22, 2009 12:27 pm

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: Google Feedfetcher and 7 guests