Android - supress the native In Call Screen and replace with 3rd party? - android

Currently creating a VOIP application for Android and I was wondering is there any possible way to supress the In Call Dialog when sending a call over GSM and use our own 3rd party In Call Dialog or screen instead?
At the minute when we switch from our VOIP call and send it over GSM via the ACTION_CALL intent it does everything we want except it brings up the native In Call screen whereas we want our own In Call screen to display here.
So I was wondering what kind of options we would have on this?
What would you reccomend we look into doing?
Thanks in advance

Unless you are running your app on a rooted device, you cannot supress the native in call screen, nor the native calling screen.

Related

Make a phone call without default native app Android

Is any way to make a phone call inside the app? I don't want to use the native app to make calls, just make the call inside the app (this means don't use the classic intent with the uri for start the activity of calls), I know that I need to have configurations for make the call, but I don't have a reference or documentation about this topic.
If you mean phone calls the answer is no, you can't bypass the native phone app.

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

Custom dialler for Internet Calls (Android)

I'm trying to get an idea of what's possible and what isn't in terms of using a custom dialler app for internet calls.
The idea is that the standard Android dialler be used when no internet connection is available, but use a custom-written VOIP dialler / caller app whenever an internet connection is available.
I see that in the Android call settings you can set it to use Internet calling whenever a connection is available. How does this work? Does this simply tell the native dialler app to use internet calling, or is there actually a specific Intent or something that gets fired when an internet call is made so that I can open my custom SIP app?
And also, is the 'standard phone app' icon always linked to the standard phone app, or can you override this phone icon to open your custom VOIP app when a connection is present?
So basically, is there a way to seamlessly and automatically switch between the standard dialler and the custom SIP dialler based on whether or not the phone is connected to the internet?
If not, is this something that could be done by customizing Android?
Thanks,
There are four possible ways of doing what you want that I know of:
1. Replace the Android Dialer
This is hard and a lot of work. The Android Dialer (last time I checked anyway) WAS the telephony stack in Android. So to replace it you have to replace the complete telephony stack (including any public API) i.e. handle all cellular (and now sip) calls in and out of the device. Also the only way to replace it is to root the device as it can't be replaced normally.
2. Provide your own Dialer that is separate to the main dialer.
This has it's advantages that you will never get into "trouble" with anything else.
3. Hook into the outbound call API (ACTION_NEW_OUTGOING_CALL)
This is something that is pretty cool and I haven't seen any other OS allow you to do. Basically you can trap when either the normal dialer starts to dial a number (or when another application starts to dial a number as well) and you can either allow it through, modify it or cancel it. Behavior I've seen from sip clients is that they will cancel the call and put up a selection screen prompting where you want to send the call (sip, cellular or something else).
Here is an example of it's use.
The downsides are:
You can be fighting with other applications to which gets first go. There is a 'priority' setup, but all I've seen is everybody wants to be number one.
On some Android devices where the OEM providers that own Dialer, they don't always fire it!!!
4. Detect when the dialer is shown and show your own dialer in front of it.
This works and does allow you to provide a nicer more integrated feel as you can provide call type selection within the dialer, as well as other custom number lookups but that can be a little tricky to do on some devices.
I would suggest 3 to begin with as it's pretty easy to do and you can get something up going pretty fast. In code that I have worked on, we have done 2, 3 and 4 and also looked into 1.

Use default incoming call screen fro making fake call

Is there a way to use default incoming call screen with its functionality (answer and reject) from inside my application.
I want to make fake call from inside my application and i don't want to create custom incoming screen but use default incoming call screen on device because different devices have different incoming screens.
No, this can't be done using the standard SDK. First, the call screen activity can only be launched by the system. Second, vendor-specific skins of Android often replace the default phone app with a custom one, so it's unlikely you'd be able to do this on all devices with just a single piece of code even if it were possible.
Your best bet would be to try to recreate the incoming call screen for the most popular devices and detect which device the user is running, which I know isn't what you wanted to hear. Sorry.

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

Categories

Resources