I use:
MediaRecorder.setAudioSource(int)
or
AudioRecord.Builder.setAudioSource(int)
record both voice in call.
I need to know that record call for caller only, mean could't record my voice in the call (voice from mic) possible or not.
Recording only caller's voice could not well supported on all devices/implementations.
Moreover this behaviour could change from one Android version to another according to what Manufacturers want to open their devices.
Many devices can record only BOTH streams, others can record only from MIC...
Starting from Android 7.1 Nougat up to 8.1 it is not possibile to record Voicecalls if the App is not signed using the System Certificate, so only System App developed by the Vendor could record voicecalls.
Few bugs were discovered in these years to let the developer records even if the System denies it, but those remains quite secrets to few developers.
However to record only called voice you have to set the Source as "AudioSource.VOICE_DOWNLINK".
Related
I installed a cheap chinese Android based car head unit in my 15 year old second hand car, with probably Android 8 or 9 (maybe even a fake version where the version shown is higher than is installed). For most things it works. Sound output is good, bluetooth works, Wifi works, Google apps like Maps, Chrome, Youtube all work.
I have an external mic attached to it. There is a sound recording app, which records the sound when I use this mic. I can replay the sounds, so far so good. So here's the thing: the phone app does not pick up this mic, and also no sound on the tiny mic that's built in. Same for Google Voice Search, it just doesn't pick up anything. When I call someone, they don't hear me speaking at all.
My question is: how do I go about debugging it? Is there some kind of app that I can use to diagnose, which will at least show device mapping, or show signals like in Windows?
As per official documentation
Android 10 (API level 29) and higher imposes a priority scheme that can switch the input audio stream between apps while they are running. In most cases, if a new app acquires the audio input, the previously capturing app continues to run but receives silence. In some cases, the system can continue to deliver audio to both apps. The various sharing scenarios are explained below.
Other than some special cases, audio is not shared between apps.
But I have seen many apps sharing the audio input without being in the above special cases.
For eg. Zoom, when I'm on a call in zoom and start an audio recorder then both the apps are getting audio though zoom audio decreases in intensity.
Similarly, Omlet arcade is able to record mic audio even when mic access is given to other apps.
How is it possible? And as per the documentation, this shouldn't be allowed.
Update:
Was able to achieve it with the usage of Oboe. But it is not consistent on all devices. This also causes a sync issue in my live streaming app. Audio is audible with a delay
This is not possible in Android 5+ . You need a rooted phone to perform this action. In Omlet Arcade Whenever you play a Game and switch ON in-game mic, Omlet Arcade will stop receiving any audio input. However, Omlet Arcade will still function but you have to restart it in order to get voice input back.
Though, in a recent MIUI bug, People were able to listen to calls on Zoom and in-game mic apps. In your case, it might be not official Android and Edited Android like MIUI and OxygenOS
There are plenty apps in google play, which can record calls. Some of them just turn on loudspeaker and record sound via microphone, others should be able to record audio steams directly. I know that android provides class for recording. (which doesn't work on lot of devices probably because of some SW restrictions).
So here is my question: Is there possibility to find some device, where call recording will be possible via MediaRecorder(VOICE_CALL)? I found that call recording apps are available for Galaxy SII and SIII so does it means that MediaRecorder(VOICE_CALL) work on these devices?
EDIT------------
Generally, if i want to use MediaRecorder to record calls i need kernel which supports it (for example som custom kernel)?
I'm currently searching for options on how to manipulate audio on android. The goal is to process audio from the microphone in real time during a phone call. The best solution would be to do this on a native call. But rebuilding a telephone app (no VOIP) would be fine too. Are there any ways to achieve this with Android APIs (also undocumented)?
If not, which steps would be necessary to get things running?
On iOS there are some apps which manipulate voice but create a VOIP connection. I heard that on Android you can "clone" the telephone app and eventually feed it with your own audio stream? Aren't there apps which add noises during a call? What kind of APIs are involved?
The best solution would be to do this on a native call.
This is not possible. You have no access to the in-call audio stream, except perhaps in speakerphone mode.
But rebuilding a telephone app (no VOIP) would be fine too.
The last official word from Google (2010), the entire OS has no access to the in-call audio stream, as it is all handled at a lower level. Even if newer versions of Android do have access to the in-call audio stream, "rebuilding a telephone app" is only possible if you are creating custom firmware.
As a drawback i could imagine to record the Downlink Stream using the MediaRecorder API and write it back to hardware using AudioTracks write() method. By this i could manipulate incoming voice. But still I think this wont work during phone calls. And I do not see a way to choose different hardware destinations.
i'm trying to develop an application to record calls bothside(mic and speaker). I've seen there is one app vrecorder providing this vrecorder for android 1.6.
Now i want to do this for android 2.2 and above. Can i know is this possible with MediaRecorder.AudioSource.
I've read some forums they are saying that there are some issues on doing this.
In Stackoverflow itself several questions are about record voice calls saying that not posible. But these posts are older. Is it possible to record phone calls via an Android App? .
But http://code.google.com/p/android/issues/detail?id=2117 in this discussion they are saying that some issues are there but we can implement.
Atlast, please I need some descriptive answers, that can we record voice calls in android both way (from mic and speaker).
Thanks in advance.
Call recording is not yet possible on Android. The feature request you are referencing is still not resolved.
People that have been able to do call recording use rooted phones with custom kernel.
On stock Android phones, you can only record your voice from microphone, but you can not record the sound of the other party. If you only want to record your voice use android.media.MediaRecorder.AudioSource.MIC