Detect incoming call with phonegap - android

I want to capture the incoming call event using Phonegap. I want to detect if there is any event of incoming call occured and pause my media files from playing. So far I have found about startcallbutton & *endcallbutton*events. But I want to detect the call from the moment of ringing. Searched in Phonegap google group but not finding any solution that could work for me.
I'm new to phonegap. Am I missing something? Can anyone please help me that how can I detect the incoming call and take action after that? Is that solution device independent?

Maybe this plugin solves it for you? https://github.com/renanoliveira/cordova-phone-call-trap
Do note that you will always require a plugin, since Phonegap/Cordova has no API to detect calls. And plugins are platform specific, but since you tagged your question Android I suppose you only target Android?

as I as I could remember, you should set up intent filter for calling event, and get action from that event...and handle it.
reading the following material will help you to understand~
Retrieve incoming call's phone number in Android
http://developer.android.com/reference/android/telephony/TelephonyManager.html#ACTION_RESPOND_VIA_MESSAGE
How to detect incoming calls, in an Android device?

Related

Reject a phone call in Android Java

Is there an easy way to reject a phone call in my application?
I am writing an application and I want it to reject an incoming phone call automatically.
Is there a way to do it without making the application the default call application?
Thank you.
I am writing a new application and I am a newbie so I don't know exactly where to start.
I already have something that detects the phone call and gives me the calling number. It was easy but I don't know how to reject that call.
Help. and thank you.

What event is fired when the call ends in Android?

Trying to identify the event which gets fired in Android or Xamarin Android right after the call (incoming/outgoing/missed) ends?
Please read about it here and here. In the 2nd link they have used telephony api for the same purpose, go through it, hopefully you will find it helpful.

Skype Call Listener For Android

I'm implementing a streaming radio application on android . The stream must stop when a call comes to the phone or a call is in progress .I have implemented for normal calls (phone calls) but cannot find a proper solution for VOIP calls.If possible I want it to implement it to Viber calls also . Please help !
I think you should listen and monitor ports that use these protocols..
http://en.wikipedia.org/wiki/Voice_over_IP#Protocols

Replace default Screen of android incoming and outgoing calls

I am working on android. when a calls comes in, I want to replace the default android call screen with a new screen that has answer and deny call options. How can I do that? Need some help. Any help appreciated.
Do I have to use a toast message for this?
I do have the incoming and outgoing classes.
As far as my understanding goes it is not possible to replace the call screen with an App that is installed over the Marketplace.
To do this you would at least require root permissions. Maybe you also need to reconfigure the Android Version installed on the phone.

Stoping other services like receving call and media player when my application opens?

When i open my application , i should not receive any phone call or sms i should stop the media player also. can any one tel me is there any API is available to disable and enable them again once after my application ends.please help me..
Thanks
RAM
It is impossible to block the phone call as referring to this article.
For intercepting coming sms, you may be interested in that thread. Apparently there is a way to do that, but not a clean one.

Categories

Resources