Search code examples
androidphone-call

Make phone calls from my app instead of the default phone app


The feature I want to implement is: make a phone call from my own app instead of using the system's default phone app.
I read that this is done using intents.

Most of the times, people are using intents to popup the system's phone app to handle the call.
But, I want to do that myself. The call will be initiated from my app only.
So this is not for calls from other apps.

In short, the user will dial a number from my app and my app itself will make a call (cellular network) and handle it.
From this blog post, it seems to be possible.
Is it really? How?


Solution

  • Its not possible in Android OS (Edit Below API level 26)

    If you are running your app on a registered Android device then you have to follow their terms which is not allowing your app to handle calls on your own.

    FYI: The cellular call depends more on hardware than software.


    Edit

    In API level 26 (Oreo) they have introduce new API. The ANSWER_PHONE_CALLS permission allows your app to answer incoming phone calls programmatically. To handle an incoming phone call in your app, you can use the acceptRingingCall() method.

    Just to be noted

    'These permission are both classified as dangerous and are both part of the PHONE permission group.'