Android :: Can Audio Stream Output From Earpiece During Call Be Captured?
Jan 29, 2010I am looking to develop an application and would like to know if the earpiece audio output can be captured.
View 1 RepliesI am looking to develop an application and would like to know if the earpiece audio output can be captured.
View 1 RepliesI have seen apps in the Android Marketplace with regards to an app recording an ongoing phone conversation. I am interested in how this is done. Anyone knows how the call is being recorded?Is there a way to maybe get an Audio Stream for a call in Android?
View 2 Replies View RelatedI am planning on developing my specific voip app for android.when a phone call occurs I want to hear the person who's calling on my local pc speakers and I want to speak to him via my own pc microphone / headset. So I need to send the audio stream of both me and the person I am talking to via the wlan network.
View 2 Replies View RelatedI've implemented "Audio Capture Setup and Start" example (http:// developer.android.com/guide/topics/media/index.html) with small modification - the output format is MPEG_4 not THREE_GPP.
The result - records with extremely poor audio quality.
Could you help me to understand where is error and how is possible to do really good audio records with Android?
I've done an experiment with Camcorder - standard Android application. Sound quality of the video is same poor. The audio signal is extremely low (quite).
Is it "by design" or may be some hardware problem (T-Mobile G1)?
I've found description similar problem here - http://osdir.com/ml/AndroidDevelopers/2009-06/msg00752.html - "Microphone audio capture with emulator is of very poor quality". In my case this problem reproduces on the real device. Unfortunately I have not found answer. I read about some "custom" encoders.. but have not found any example how implement them.
I currently have code that reads a recording in from the devices mic using the AudioRecord class and then playing it back out using the AudioTrack class.My problem is that when I play it out it plays vis the speaker phone.I want it to play out via the ear piece on the device.Here is my code:public class LoopProg extends Activity {
boolean isRecording; //currently not used
AudioManager am;
int count = 0;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
am.setMicrophoneMute(true);
while(count <= 1000000){
Record record = new Record();
record.run();
count ++;
Log.d("COUNT", "Count is : " + count);
public class Record extends Thread
{ static final int bufferSize = 200000;
final short[] buffer = new short[bufferSize];
short[] readBuffer = new short[bufferSize];
public void run() {
isRecording = true;
android.os.Process.setThreadPriority
(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);
int buffersize = AudioRecord.getMinBufferSize(11025,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT);
AudioRecord arec = new AudioRecord(MediaRecorder.AudioSource.MIC,
11025,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT,
buffersize);
AudioTrack atrack = new AudioTrack(AudioManager.STREAM_MUSIC,
11025,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT,
buffersize,
AudioTrack.MODE_STREAM);
am.setRouting(AudioManager.MODE_NORMAL,1,
AudioManager.STREAM_MUSIC);
int ok = am.getRouting(AudioManager.ROUTE_EARPIECE);
Log.d("ROUTING", "getRouting = " + ok);
setVolumeControlStream(AudioManager.STREAM_VOICE_CALL);
//am.setSpeakerphoneOn(true);
Log.d("SPEAKERPHONE", "Is speakerphone on? : " + am.isSpeakerphoneOn());
am.setSpeakerphoneOn(false);
Log.d("SPEAKERPHONE", "Is speakerphone on? : " + am.isSpeakerphoneOn());
atrack.setPlaybackRate(11025);
byte[] buffer = new byte[buffersize];
arec.startRecording();
atrack.play();
while(isRecording) {
arec.read(buffer, 0, buffersize);
atrack.write(buffer, 0, buffer.length);
arec.stop();
atrack.stop();
isRecording = false;
As you can see if the code I have tried using the AudioManager class and its methods including the deprecated setRouting method and nothing works, the setSpeatPoneOn method seems to have no effect at all, neither does the routing method.Has anyone got any ideas on how to get it to play via the earpiece instead of the spaker phone?
Is there an Android equivalent to the iOS Core Audio / Audio File Stream Services? I need to be able to read audio bytes from a network and feed them to the audio system under my control, so I can do my own timeouts / reconnects / range requests / etc. without interrupting the audio playback (since the system audio thread would be playing audio already enqueued). It seems that MediaPlayer doesn't give me this level of control. Is there a lower-level framework that does, either in the SDK or NDK?
View 2 Replies View RelatedI'm trying to change the audio path to earpiece from speakerphone, and I cannot get it to work on the G1: the audio always goes through the speakerphone. Here's the code snippet: /************************/ private AudioManager am; am.setRouting(am.MODE_NORMAL, am.ROUTE_EARPIECE, am.ROUTE_ALL); /************************/ I took logs for this issue and compared them to logs from the calling app when I turn off the speakerphone there and they look similar: (from calling app) D/AudioFlinger( 35): setRouting 2 1 -1, tid 57, calling tid 58 E/AudioFlinger( 35): mA2dpDisableCount is already zero I/AudioHardwareMSM72XX( 35): Routing audio to Handset D/HTC Acoustic( 35): msm72xx_enable_audpp: 0x0000 (from my app) D/AudioFlinger(35): setRouting 0 1 -1, tid 54, calling tid 58 I/AudioHardwareMSM72XX(35): Routing audio to Handset D/HTC Acoustic( 35): msm72xx_enable_audpp: 0x0000 The main difference here is that I'm trying to change the audio path for MODE_NORMAL, while the calling app is changing the audio path for MODE_IN_CALL.
View 7 Replies View RelatedI literally just got a refurb eris today and when I went to make a phone call I could hear nothing through the earpiece and the person on the other end couldn't hear anything I said. This seems to be a version of the silent-call bug but this time I can hold a conversation with speakerphone and they can hear me, but when it's just through the earpiece like normal both parties get silence. Since this is a fresh refurb could someone with the OTA post their software data so I could compare it to what I have, I think I found one earlier while screwing around and it looked like it matched but now I want to double check.
View 3 Replies View RelatedCan i stream my whole audio-output from my android device via a random protocol to my PC?
View 7 Replies View RelatedI'm developing for the Android platform.
My app creates a temp file with a simple call to:
FileOutputStream fos = openFileOutput("MY_TEMP.TXT",Mode);
It works fine because I can write to it and read it normally.
The problem is that when I exit from the app I want to delete this file. I used:
File f = new File(System.getProperty("user.dir"),"MY_TEMP.TXT");
f.delete()
But it always returns false and the file is not deleted.
I have tried
File f = new File("MY_TEMP.TXT");
f.delete();
And it does not work either.
Please give me a clue, to pass CTS. I'm try to do CTS test. The Android 1.5 r3 which I get from Android Open Source fails CTS. Mean while, if I download Android 1.5 r3 and run CTS test for emulator it's PASS. the module fail CTS is: java.io.OutputStreamWriterTest I run test with follow string: start --plan Java -t tests.api.java.io.OutputStreamWriterTest#test_write$C I found that java.io.OutputStreamWriterTest class belongs to core.jar I compared sizes of core.jar build by me and build by Google, and it's different for 362 bytes. I'm completely frustrated. What's I'm doing wrong! For building we use: Java jdk: 1.5.0_16 Ubuntu version: 8.04 All others libs installed as mentioned on the http://source.android.com/download. Building by command: make or make sdk Error log:
<FailedScene message="junit.framework.AssertionFailedError: Error when reading bytes in UTF-8 expected:"8916"; but was:"8907"; at tests.api.java.io.OutputStreamWriterTest.test_write$C (OutputStreamWriterTest.java:470)"> <Stack Trace>at tests.api.java.io.OutputStreamWriterTest.test_write$C (OutputStreamWriterTest.java:470) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:164) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:151) at android.test.InstrumentationTestRunner.onStart (InstrumentationTestRunner.java:418) at android.app.Instrumentation$InstrumentationThread.run (Instrumentation.java:1520) at tests.api.java.io.OutputStreamWriterTest.test_write$C (OutputStreamWriterTest.java:470) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:164) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:151) at android.test.InstrumentationTestRunner.onStart (InstrumentationTestRunner.java:418) at android.app.Instrumentation$InstrumentationThread.run (Instrumentation.java:1520) </Stack Trace>
How is Bluetooth audio quality with your Evo? I'm using a Jabra Extreme earpiece and am experiencing poor audio quality. One person with whom I was speaking said that I sounded like I was running or was in a windy location (I was calling from a quiet hotel room). On my end there was noticeable static. As a test, I hung up and paired the Jabra with my Blackberry 8830, and the person with whom I was speaking said that I sounded a little distant, but otherwise clear. On my end, the audio quality was good.
View 3 Replies View RelatedThere does not seem to be any Android manifest permission that needs to be set for file io. Code...
View 2 Replies View RelatedI'm trying to play a music (using MediaPlayer) during a call and want the caller to hear the music I'm playing. Unluckily it doesn't seem work at all, the caller hear nothing even I set the music volumn to MAX ( of course, the speaker and the mic on Android are far away from each other). Is there any ways to route Android's audio output to its Mic? Or something like "Stereo Mix" in Windows?
View 3 Replies View RelatedI was playing around with some of the live wallpapers and thought it'd be neat to try to make something like the frequency/waveform visualization wallpapers, but I'm not sure there's an API to get the audio output data from the device. I know you can use AudioRecords to get this sort of data from microphones. Anyone know if there's a way to manage it for a device's output?
View 2 Replies View RelatedCan android apps share access to the audio output? I sometimes use Maps Navigation, which will give audible turn by turn instructions. I plug the EVO to my car stero using a patch cord so that I hear the instructions over my radio.
However, if I'm using another application that outputs audio, like Pandora or the music player, they go silent as soon as Maps speaks an instruction.
What I would like is for the apps to be able to share the audio output with some kind of priority set, so that Pandora would pause momentarily while Maps spoke an instruction and then resume.
Is that possible?
Is there a method to access the digital output of the audio codec without first storing it into a file, a streaming output?
View 5 Replies View RelatedI'm toying with the idea of making a car dock for my Droid. The official Droid dock doesn't work with any cases and if the iPhone is any indication, no one will ever make one that does. Plus, it doesn't do everything I want.
I want to plug my phone in with as little fuss as possible, have it charge, output audio to my car stereo through USB. Charging is absolutely necessary, and I want to avoid using the headphone jack for audio if I can because it's an extra thing I'd have to plug in rather than just sliding the phone right in the dock. Better yet if the USB audio output is a constant volume intended for control on another device.
So.. Is it possible? If I need hack a car charger in to a usb audio cable I'm fine with that (unless I could get both in one). This thing would do it, but it looks like it has more pins than standard usb (can't really tell in that pic, but maybe someone knows?), and the Droid doesn't.
My other options are connecting the Droid directly to the head unit via USB and mounting it as a mass storage device, but I prefer the way the Droid handles music better than the head unit, and mounting the USB is an extra step I'd probably get too lazy for. And finally, I'd considered making an app that spoofs an iPod, since my HU has iPod controls, but that's more work than it's worth when the Android music player's controls are just as good.
I subscribed to JetFlix, in the market. (Jetflicks! TV - Android app on AppBrain) It is a $3 app with a $10/month subscription. I watch it on my phone in my car at the lake during my lunch break. I know that probably sounds sad, but it is AWESOME. I'm a manager in the dang corporate world, and I forget that I am at work by the time I'm done with a movie and come on back to the office. It's my dirty little secret. ANYWAY, there are some great shows available on this application, and I was thinking of replacing my Netflix subscription with it if I could just stream it to my TV at home. I haven't bought an HDMI cable yet, because I don't have a use for one just yet. But is anything "streamable" to the tv? I read that only pictures and videos that were shot with the camera stream though the HDMI cable. If that is the case, what is the point? I keep all that stuff on a hard drive anyway. So my question: can I hook up an HDMI cable and stream Jetflicks to my TV? The Jetflicks movies play on the native Internet browser. So I guess a more accurate question would be: Does the native internet browser display on the TV through the HDMI cable? If so, is there audio?
View 10 Replies View Related I use music application (PlayerPro) and a time (LafayChrono). Problem, the clock application serves medias volumes output, not the alarm volumes output. So, I can not set the volume independently of one another.
My question is, if it is possible to "root" the sound output of an app to another type of volume (LafayChrono to alarm volumes output) ?
When I connect my Droid RAZR MAXX or ASUS Transformer to my HD monitor, the video displays fine, but there is no sound. I suspect this is because the monitor does not have any speakers, but I was hoping there would be a way to just let the audio play from the device. That's what my laptop does when connected via VGA (which might not support audio anyway; I don't know a lot about the different inputs/outputs).
View 2 Replies View RelatedFirst, my specs: I have an HTC Evo 4G LTE, software, firmware is current. I am using a Plantronics M50 earpiece. The problem: I have it in a Sprint car dock while driving and I make a couple calls on my way home from work using my Bluetooth. It started about 2-3 wks ago. I'll start a call and while the phone is ringing on the other end, it goes silent in my ear and I can hear it through the normal ear speaker on the phone (speakerphone doesn't kick on). I have to turn my Bluetooth off then on again to re-establish a connection. Then it stays on through the call. It happens when I answer a call as well. Happens when not in the car dock too. It doesn't do it twice in the same call, after reconnecting the Bluetooth, the call stays connected. I have already unpaired the Bluetooth and did a simulated battery pull (battery is not removable) and hard reset to clear data then pair it up again, but it still does it. I have a feeling that it's not the Bluetooth, but something in the Bluetooth software in my EVOLTE.
View 1 Replies View RelatedI'd like to use my Moto Droid in my car using as few as cables as possible. Does anyone know if there is way to connect just the USB cable so I can charge the droid and get analog audio too? I would like to connect one cable to the droid when I get in my car and not mess with the 3.5 audio connector or an FM modulator etc. I was thinking there may be a cable that connects to the droids usb and can charge the droid and have a 3.5 auxiliary audio output to plug into my stereo.
I read a few of the threads on the forum but couldn't locate the answer and it doesnt seem any of the similar 3-1 or 2-1 products I find list the moto Droid as an approved device. (HTC Multifunction Audio Adapter for CellularSouth HTC Hero / HTC Hero / Sprint Hero / T-Mobile myTouch 3G, myTouch 3G Fender / Verizon HTC Droid Eris - Phandroid Store)
Does anyone feel that EVO's media audio output volume is low? I am a former iPhone user and IMO there is a noticeable difference in the overall output db level compared to iPhone only when playing audio files like mp3 and .wav. Does anyone know if there is a way to boost the audio output volume for non rooted users? Is there an app that could help?
View 13 Replies View RelatedI used Class MediaRecorder to play mp3 file, the source like this:
CODE:.............
It runs no problem. But I want to get the stream,and write the byte array to the stream, let mick sound the refreing voice.
by use java source I can did that. the source like this:
CODE:.............
You know,Android SDK don't include the class SourceDataLine(package javax.sound.sampled).
Fine for using headphones but I plug mine into aux on my car radio. Could be louder to be honest. Just wondered if there was any way to increase the max volume output?
View 3 Replies View RelatedOk we all know that our evo music playback on headphones is ridiculously low especially if you coming from the iPhone, but today I found Astro player beta which have some good equalizer that can boots your audio output to new level,even louder than the iPhone 4 output with the same headphones,so try it out and keep in mind its still in beta stage so it force close a lot but it doesn't affect music playback when it does that.
View 3 Replies View Relatedis possible to analyze audio stream spectrum with Android API (similar to what you can easily do with Flash). Basically what I need is to determine the duration between two claps in a small audio record. The claps are much louder than the background, so theoretically it should be somehow possible..
View 5 Replies View RelatedI want to send audio stream to internet directly, instead of store in the file. But the output of MediaRecord only supports file by seting setOutputFile(String path) , not OutputStream. Is there any methods to do this?
View 2 Replies View RelatedCan i stream the audio from my mac to my phone?
View 3 Replies View Related