My application wants to get the event at which the call is ringing on the other side. Or when, the user on the other side has picked up the call. I tried android.intent.action.NEW_OUTGOING_CALL but it is of no use to me. I have gone through the TelephoneManager, but i am not able to get the solution.
Listen to phone state of the device, check this link:
Android: Taking complete control of phone(kiosk mode), is it possible? How?
Try to achieve with CALL_STATE_OFFHOOK of the telephoney manager:
CALL_STATE_OFFHOOK
At least one call exists that is dialing, active, or on hold, and no calls are ringing or waiting.
Related
When Android phone receives an incoming call from a specific number the phone's ringing the screen should not blink. What I mean is the user should not be able to know that there was incoming call, but actually there was because i am blocking the incoming call through telephony manager but before ending call through telephony manager in broadcast receiver screen lights up that cause use in suspicion that something has happened.
Any help in this regard will be really appreciable.
I am using a broadcast receiver in my app, to display a photo on BOOT_COMPLETED. However, I noticed that if I receive a phone call on my phone, the photo is displayed in front of incoming phone call activity, so I can's see who is calling me and what is worse - can't answer the phone.
What is the best way to override this behavior?
you could add another mechanism for listening to phone calls events, and if you detect that the phone is ringing (or the call was answered), you won't show the activity...
in any case, please don't show such things. no user likes popups go out of nowhere.
instead, use notifications to tell the user something has happened.
Is there any Skype listener in android?? like phoneStateListener which listen the events of phone call either it is in offhook, on call, idle state etc.
So, is there any listener for Skype in android by which we can detect the call events on skype either it is idle, offhook or something else??
I know there is lots of articles which says Skype doesn't provide any api access.
Please let me know if something which i can do to get the events for Skype.
Hopefully an easy one for someone, but causing me problems.
I have an app that loops sound files. I have no code in onPause as I want the app to continue playing music in the background.
I now need the app to close if an incoming call is received.
I can add code to onPause and close the activity and stop the mediaplayer. However this stops the app if any app is launched.
How can I detect an incoming call to check for inside onPause?
To detect the incoming call, we register a BroadcastReceiver for the
action android.intent.action.PHONE_STATE. This will be broadcasted
when there is a change in phone state. The receiving intent will have
an extra string variable TelephonyManager.EXTRA_STATE which describes
the phone state. If this state is TelephonyManager.EXTRA_STATE_RINGING
then there will be another extra string variable
TelephonyManager.EXTRA_INCOMING_NUMBER. This variable contains the
incoming phone number. Note that this variable will not be present
when the state is not TelephonyManager.EXTRA_STATE_RINGING.
source : http://www.androiddevblog.net/android/detecting-incoming-and-outgoing-calls-in-android
basically, once you register a broadcast receiver you can listen for the broadcast notification you are interested in your phone, and then act accordingly.
You do not have to. Android takes care of it pausing your app - you have to use telephony manager to determine whether to stop your aplication or not. Proper way would be to handle this in onPause() method
I would like to know whether this is actually possible in Android?
When Android phone receives an incoming call from a specific number the phone's ringing should stop and also the screen should not blink. What I mean is the user should not be able to know that there was incoming call, but actually there was.
I do not want to delete any call logs, just to stop sound on incoming call from a specific number and that too at a specific time.
Can someone let me know if this is actually possible?
When Android phone receives an
incoming call from a specific number
the phone's ringing should stop and
also the screen should not blink. What
I mean is the user should not be able
to know that there was incoming call,
but actually there was.
Fortunately, this should not be possible from the SDK. You can be notified that a phone call comes in, but I do not believe you can stop the ringtone, and I am really sure you cannot stop the in-call screen from appearing.