Want to initiate and manage a voice call from an android application - android

I want to initiate and manage a call from android, without any interaction with the default dialer. The call should automatically be initiated from the application, and the application should be able to send DTMF tones programatically, and also terminate the call programatically. The dialer should never come to foreground during this process.
I have seen many examples of initiating the call with an intent. Unfortunately, the call will be passed on to the dialer and the dialer will take control from then on.
Here is one such example.
Android: calling number without user init?
Is this possible? If not, it would help if you can point me to the documentation.

Related

Android app interface with standard phone call

I want to know if its possible to create an app that activates in the background when the user gets a phone call ? and if it is possible I'd like to know where I can find more information about how the app can interact with the phone call.
For example, is it possible to turn off / on the mic during a call or intercept it, add sounds in the background etc.
You could use "Broadcast Receiver" available in the API Android.
Here tutorials about those (specific to your very question):
http://androidexample.com/Incomming_Phone_Call_Broadcast_Receiver__-_Android_Example/index.php?view=article_discription&aid=61&aaid=86
And another :
http://www.vogella.com/tutorials/AndroidBroadcastReceiver/article.html#tutorial_receiver

Android - make phone call, keeping my activity in foreground, i.e. phone-call in a separate thread?

Is it possible for a 3rd party Android application on an device that is not rooted, to somehow make an outgoing phone-call, without launching the dialer ? What I mean is that my own Activity (displaying some information, image or video) keeps running in foreground, while the phone-call progresses in the background. Clearly, my Activity needs to be aware of call-state changes (i.e. when call is terminated). My own Activity (not the dialer), would have the "Call" / "Hang-up" buttons.
If possible, kindly share some pointers and hints as to how this could be done. If this is possible via the ITelephony (or other such) reflection based API, even if it is undocumented and hack-based method -- I would like to know about it.
So far in my research, I've come to know of only the method where you place the call directly to a number, without having to open up the Dialer first. However during the phone call, the Dialer application's Activity is open. I cannot show any other information on the foreground. Any alternative workaround, s.a. using Dialog overlay etc., might work as worst-case fallback, though I am not sure if there is anyway to show any "active" content (s.a. images that change, or video) in a Dialog.
Finally, can Fragments be a solution ? Can I show the DialerApplication activity in a Fragment ? I don't think so, but wonder if there's any hack possible for it ?
1) Is it possible for a 3rd party Android application on an device that
is not rooted, to somehow make an outgoing phone-call, without
launching the dialer ? What I mean is that my own Activity
(displaying some information, image or video) keeps running in
foreground, while the phone-call progresses in the background?
Ans.
It is not possible to keep our application foreground during phone call because the phone call is a system app and has highest priority.
2) Clearly, my Activity needs to be aware of call-state changes (i.e.
when call is terminated). My own Activity (not the dialer), would
have the "Call" / "Hang-up" buttons.
Ans.
Yes this is possible to get notify on call-state changes.
Look at here

Detect Incoming Call Before Default Phone App

Is it possible to detect incoming call before default phone application, and prevent to active default phone application in Android?
Looks like it may not exactly be possible according to this -> Create a custom call handling Application.
Anyway more research may be required on your side to check if it can be. Multiple posts on Phone broadcast receiver can be used as reference.

Making calls without ACTION_CALL activity

Is there a way to make a call from my application, but keep my activity in focus? ACTION_CALL shows the call screen, but I want to show my screen instead, with my own control to end the call. Is this possible? e.g. is there a service that does the actual phone call?
I basically want to allow the user to call another user, while still interacting with my app.
You can not change or customize the call screen unless you are building your own ROM
That is not possible from an SDK application...
You can try to design your application so that it works with a backgroud service so that you achieve your goals

How to redirect on a app from a -in app- button

is it possible to press a button and start a call e.x. in skype?(i know that is possible for a telephone call but i would like to see if i can make this stuff with a voip app as skype)
If the user has skype installed, and the user tries to place a call there are two options you can take:
i.e. just try and call skype directly (but this requires knowing the correct intent to launch skype) or you request to make a call and the user will be shown the option to use skype to place the call (unless they've set the default dialer and the primary application).
I think there may be a way to get a list of activities that are registered to handle certain events (i.e. get the list of dialler apps on the device) from this you might be able to find the skype app and get enough information to force the use of that. The problem with this is you are then tied into using skype and only skype rather than let the platform handle it.

Categories

Resources