Make Phone Calls on Adobe AIR on Android - android

I'd like to make a phone call via an AIR application on android. I know you can do this:
navigateToURL(new URLRequest(tel:555555555));
But I want control of the phone call.
The aim is that the app missed calls a selected number. So it calls, waits for it to ring for 1 second and then cuts the call. But with the method above, the app has no control of the phone call.
Thanks

As of now, there is no way that you can 'control' the call flow using AIR apps. The best you can do is invoke the native call application using 'tel' protocol, which you have mentioned.

Related

Twilio - how to open activity when calling web to phone

I have implemented the Twilio in my app and have made it so that web to web calls can be made and also web to phone calls. The only thing is that if I call Voice.call() with my user's phone number, it'll call him but the call will not open my activity on his device. The phone call UI will be the default decide's UI for incoming calls. If I, on the other hand, use the user's defined identity on his device, it'll go nicely via my activity.
Any ideas on how I can make the web to phone call using a phone number and redirect the call via my activity?
I have been unable to find any documentation in this regard.
Cheers!
Twilio developer evangelist here.
It's not the job of the Twilio SDK to intercept phone calls made directly to the device. However, since Android is flexible enough to replace the default phone application, you can do this yourself.
I am not an Android developer however, but a quick search around lead me to this tutorial on using a BroadcastReceiver to run your own code when an incoming phone call occurs. This StackOverflow answer might help you get started too.
Hope that helps.

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.

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.

Can i call an android application's method remotely?

I am developing an android application. What i want is to call a method present in that android application remotely from a desktop like from a "servlet" or an application.
How can this be done?? For example i want to call a method which i have already written in the app which calls a particular number. How can i invoke this method remotely?? please help.
PS - It is kind of urgent.
It will be hard to communicate from your desktop to your handheld. But you can poll a server from your handheld.
Write an app that every n seconds (the frequency you require) polls e.g. a web page on your server. When the web site's content is "noop", the app does nothing and keeps on polling. If the web site's content is "doit", the app dials the number you want.
So, when you change the content of this web page either manually or programmatically you can "remote-control" your hand held.
This is just an example, it must not be HTTP, neither NOOP and DOIT, just anything you like. Let the server return the phone number which you want dialled for instance.
Well, sounds like you want your app to be waiting for push notifications. I think this question is exactly what you need to look at.

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

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.

Categories

Resources