So I am trying to create an app that can answer and reject incoming calls.
I've trying every single solution possible than I could find like using the audio manager for lower version then for higher versions use the media button and for Oreo+ use the answerRingingCall method. But none works. ITelephony is Dead and does not exist. And I can't manage to get it working even though I know it's possible since I have seen apps that can do it.
Can someone please help me find a solution?
Thanks in advance.
Related
I am trying to add support for bluetooth devices like headsets/headphones/car stereo to my android app which allows user to make SIP/VoIP calls. I am trying to mostly address the requirements of Answering and Ending of calls using button on bluetooth headsets, other buttons/features handling is good to have.
With the search I have done and all the text I have read so far, I have come across the following-
One common way suggested everywhere is registering to ACTION_AUDIO_STATE_CHANGED. But this doesn't really helps me. Intents for it are sent every time the button on Bluetooth headset is pressed And also when we start the ring tone on bluetooth headset.
A very common solution I found was use of Bluetooth Adapter class. There isn't much you could do with it. So again not helpful.
Another approach I came across is the use of Vendor specific headset events. After some efforts I was able to get this working for specific Plantronics Bluetooth headsets. Supporting Jabra is important.
One more approach I came across is binding with IBluetoothHeadsetPhone.aidl, the way the phone app does it. I could find very little information on it, not enough to go ahead and implement any thing.
If anyone has done such things, I think the problem I am facing is not an uncommon one, I just believe it is not documented well.
Any pointer, approach, link would be appreciated.
I will try to add more info as I find any or any other approaches I try. Please ask for details if you need any more on the solutions I have tried. And please suggest changes instead of just flagging the question.
Thanks in adv.
Sorry about the late post. I was able to find a solution for this issue. It is not simple fix.
You need to use ConnectionService from Android telecom framework. Check out this link here & here. After this your VoIP calls will have cellular call like treatment.
We are working on an application similar to "Funny Call" on Google Play.
When user makes a call to another another contact, we would be intercepting the call and will add some effects to it and then this modified sound will reach the recipient.
I've searched for the solution to this problem and found out that many developers say Android does not support this.
Android API for call sound stream manipulation
Can the Android API be leveraged to modify the caller's voice during the call?
But, I would still like to know if its really not possible straight from the horse's mouth. I would like to know if there is any specific reason behind this.
Is there really no way to achieve this?
Can you please also tell me if there is any possibility of this being possible in near future?
Is there really no way to achieve this?
If you read through the comments on the app you cited, it would appear that they are doing VOIP, and that their servers are then actually placing the call, as that is why there are calling rates to different countries. I see no evidence that they are using the on-device telephony capability. You, of course, are welcome to supply such evidence, if you have any.
As part of my application I need to block incoming calls. I.e While my application is running, I will drop any call and simply notify the caller that the user is busy or something similar.
I wish to do this using the android SDK, I hope to support Android versions 2.2 and above.
I've already looked at
How to block calls in android
(Says, and I quote "It is Mission Impossible for the time being.")
Intercept incoming calls
(Also says not possible)
Can we intercept incoming call in android?
(Gives telephonyService.endCall(); as the solution)
Create a custom call handling Application
(Says it's not possible)
https://groups.google.com/forum/?fromgroups=#!topic/android-developers/gc5vOHjBE30
(discussion seemed inconclusive)
But they don't seem to be of much help.
Even after reading of a lot of questions on stack overflow, google groups and other forums I am still not clear as to whether this is possible or not. Also a lot of the questions and threads are over 2-3 years old, thus adding to my confusion.
And if this is possible then what would be the best way to do it?
Seems like this is not possible after android 2.2 which dropped the hidden itelephony interface.
So yes "It is Mission Impossible for the time being."
I want to record call from android phone.
I am using android.media.MediaRecorder pckg.
Also used following code:
mrec.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
mrec.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mrec.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
But I didn't succeed in recording an incoming call.
Can anyone recommend a tested code snippet?
Also,
Is this true?
http://groups.google.com/group/android-developers/browse_thread/thread/c2bc85eb60ae2aa5?pli=1
http://code.google.com/p/android/issues/detail?id=2117#c226
Standard distributions of Android does not support it till now.
You can vote up these if you want:
http://code.google.com/p/android/issues/detail?id=4075
http://code.google.com/p/android/issues/detail?id=2117
It's not a software problem and I don't think the baseband firmware vendors will fix this. Most likely because it's illegal in most western countries to record calls without consent of the other person.
Is there any way I can dynamically generate uplink DTMF tone (ie the receiver hears it)?
When I looked at the android source code I saw a function called startDTMF() which is exactly what I need, but I couldn't find any API that allows me to access that function...
I then thought of using ToneGenerator and tried to inject the sound to the mic stream, and again I couldn't find a way to achieve this...
Any help is appreciated.
Perhaps the android.media.ToneGenerator class in the SDK can help?
tel:1234,123
this can help.
, generates a 4 sec delay so you may use this at places sometimes...
but still we need to get some thing from sdk lets hope Android guys find something up!