Jamal Jamal - 1 year ago 130
Android Question

Android Intent ACTION_CALL not making a phone call

In my

application I would like to make a phone call automatically when user click the button. I have used the below set of code to achieve this functionality

Intent intent = new Intent(Intent.ACTION_CALL);

and in my
I have added this
<uses-permission android:name="android.permission.CALL_PHONE" />
permission too.

But it is just opening the dialer pad with the given
no instead of making a phone call.

Answer Source

At least in the US, 911 is an emergency number. CALL_PHONE is insufficient to call that number. There is a separate permission for that (CALL_PRIVILEGED?), one that cannot be held by ordinary SDK apps.

UPDATE: I remembered correctly. Here is the Android 6.0 platform manifest entry for that permission:

<!-- @SystemApi 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.
         <p>Not for use by third-party applications. -->
    <permission android:name="android.permission.CALL_PRIVILEGED"
        android:protectionLevel="signature|privileged" />
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download