Android :: Changing Audio Path To Earpiece From Speakerphone

Aug 20, 2009

I'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.

Android :: Changing audio path to earpiece from speakerphone


Android :: Getting Audio To Play Through Earpiece

Jan 22, 2010

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?

View 5 Replies View Related

Android :: Can Audio Stream Output From Earpiece During Call Be Captured?

Jan 29, 2010

I am looking to develop an application and would like to know if the earpiece audio output can be captured.

View 1 Replies View Related

HTC Droid Eris :: No Audio Through Earpiece

Jul 22, 2010

I 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 Related

HTC EVO 4G :: Poor Bluetooth Earpiece Audio Quality With Handset

Jun 24, 2010

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 Related

Android :: Changing Ringer Volume - Audio Manager

Apr 18, 2009

I am trying to change ringer volume but I am a bit confused. I can reach the volume_ring level by using the code:
String vr = System.getString(this.getContentResolver (),System.VOLUME_RING);

However it says in the explanation "Ringer volume. This is used internally, changing this value will not change the volume. See AudioManager." How can I change Ringer Volume? What should I do?

View 3 Replies View Related

Android :: Path To Array / Read Points On Path?

Jul 5, 2010

Is there a way to read the points created when drawing a path? It seems silly to me that a path cannot be readable.Or is it just better to manually write the current finger position to an array?

View 1 Replies View Related

Android :: Speakerphone Icon Won't Go Away

May 25, 2010

The speakerphone icon is on at the top and it won't go away. I use the speakerphone every once in a while when i'm on the phone, but not always. I tried turning the speaker phone on then off when I was on the phone, but it didn't make the icon go away. I can't find any settings to make it go away either.

View 1 Replies View Related

Android :: Speakerphone Switching App

Oct 20, 2010

Is there an app that automatically switches from speakerphone to ear piece based on the proximity detector?

I think it would be useful if there was an app that starts when in phone mode, and detects when the phone is being held to my ear and automatically switches from speaker to ear piece and back as the screen turns off or on based on the proximity detector.

With the more and more frequent state laws on hands free cell phone use while driving, something like this could be quite useful. I, for one would be willing to pay for something like this

View 3 Replies View Related

Android :: Set Speakerphone On Programmatically

Apr 18, 2010

I am trying to set speakerphone on in a call programmatically using audiomanager.setSpeakerphoneOn(true) in a service but it seems it is not working and I don't know why. Should I do something else?

View 1 Replies View Related

HTC EVO 4G :: Speakerphone NG

Aug 1, 2010

Anyone else have a blown speakerphone? It works, but you get lot's of static.

It didn't always sound like this. It was fine when I bought it, til now.

I brought it back to Sprint, they said they are ordering me a new one(white,ugg!)

View 3 Replies View Related

Motorola :: Android Player To Recognize Audio Tags On Lossless Audio Files?

May 23, 2010

Does anyone know if there is a way for either meridian or the regular android player to recognize audio tags on lossless audio files?

View 1 Replies View Related

Android :: Analog To IOS Core Audio / Audio File Stream Services?

Sep 22, 2010

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 Related

HTC EVO 4G :: Speakerphone Answers Before I Did

Nov 26, 2010

I'm sitting down with Evo on the table off to the side. My wife calls and I her talking away with someone else...before I even touched the phone

Im on hardware 4, software 3.3x..had phone (as replacement) 2 weeks now and has never happened before. I tried with other phones, but it did not happen again.

The wife did call back later... I heard no more audio till I answered but then again... it is a long shot, but maybe she was not talking.

View 2 Replies View Related

Android :: Lg Ally - Allow To Answer Calls And Enable Speakerphone By Just Sliding Out Keyboard

Jun 17, 2010

I'm looking for some type of patch that would allow me to answer calls and enable speakerphone by just sliding out my keyboard on my Lg Ally. I do have some experience in coding, so if someone could point me in the right direction,

View 3 Replies View Related

HTC Incredible :: Way To Clean Earpiece?

May 7, 2010

I know I'm not the only one with this issue, but it looks like the red ear piece gets funked up pretty easily. At first I thought it was just a lint trap, but I think it might be a mix of lint and ear skin/oil. Has anyone found any ways to clean that out?

View 10 Replies View Related

HTC Incredible :: No Sound Through The Earpiece

Nov 1, 2010

All of a sudden I can't hear anything through calls. I can hear things if I play it through the speaker, but my ear piece doesn't put out anything. Has this happened to anyone else? I've tried factory resets with no difference.

View 1 Replies View Related

HTC EVO 4G :: Turn Off The Notifications In Earpiece?

Aug 23, 2010

how to turn off the notifications in the earpiece? I hate being in the middle of a call and bam a text etc. comes in and it blasts my ear drum plus i cant hear what the other person is saying

View 6 Replies View Related

HTC EVO 4G : BlueTooth Earpiece Cutting Out

Aug 29, 2010

Anyone else having an issue with a bluetooth headset cutting out on the Evo. It started on a call and got so bad I ha to switch to the handset. it also did it playing MP3s right off the phone. This was a $90 motorola unit. So I took it back and picked up a nice Jabra for about $80 (just showing these aren't cheap units). I have not used the Jabra for a call yet, but the music cuts in and out for a few seconds every minute or so. Phone was in the holster on my hip so it wasn't a distance issue, the music is stored on the phone so it isn't a bandwidth thing.

View 1 Replies View Related

HTC Desire :: Disable Speakerphone

Apr 17, 2010

Just got my desire a couple of days ago. When I was on a call yesterday I must have moved my face away from the phone slightly and it switched itself to speakerphone! Either that or perhaps the phone didn't detect it was next to my face so the touchscreen still worked? Is there a way to disable the speakerphone (I never use this function) so that this doesn't happen again? I can't see anything obvious in settings.

View 1 Replies View Related

HTC Incredible :: Speakerphone Not Working At All?

May 18, 2010

It was working a few days ago. I try and hit speaker in-call and it say Speaker is ON but not working. How do I get it to work again? I have been getting calls from people but they can't hear me and my phone keeps d/c'ing them. I hear them but they don't hear me. What happened? The following apps are on my phone

Task Manager
Advanced Task Killer Pro
Star Maps
SetCPU
Power Manager
Slacker
Pandora
ColorNote
Battery Left
Jewel Lust Lite

Update: I turned my phone off and On again and it works. This is the second time this happened. The thing I usually do is when I charge my Phone I turn it completely off. Then I unplug it and plug it back in 2-3 times in the morning for the Full Charge. Then I turn it on and go to Task Manager or ATK Pro and kill all Apps. Bad or good?

View 1 Replies View Related

Android :: Combine Only One Audio File From Two Audio Files

Oct 2, 2010

I want combine two audio files. (A audio file + B audio file = AB audio file)So, my search result is:

1. useing an AudioTrack.

2. decode PCM from audio file.

3. combine PCM.

This is currect? It there another way?

View 1 Replies View Related

Android :: How Can I Apply An Audio Effect To Recorded Audio?

Oct 17, 2010

I want to record a sample from the microphone, then I want to play the recorded file maximizing the volume and apply some audio effect, like modifing sample rate or addind an echo.Waht is the best way? is there an example?

View 1 Replies View Related

Android :: Audio Record And Play Recorded Audio

Jun 2, 2009

Could you please let me know how to do the audio record in android emulator and play the same recorded audio. Could you please help me in proceeding in development.I tried with MediaPlayer API's also.Its not working.

View 5 Replies View Related

Android :: Determining Audio Format Of Audio Files

May 8, 2010

Is there a way to determine the audio format of an audio file in Android? On normal java I do it like this:

File file= new File(...);
AudioInputStream stream = AudioSystem.getAudioInputStream(file);
AudioFormat format= stream.getFormat();

View 2 Replies View Related

Motorola Droid :: No Sound Through Mic / Earpiece

Nov 9, 2009

I only get static if i try and use the phone but if i put it on speaker it works fine. what i wanna know is if this has happened to anybody else since i didn't find anything through search, and if so what did you do. is something i can fix with settings. i already tried a battery pull and turning it on and off. i just got the phone today and already going to have to return for another tomorrow if no fix.

View 1 Replies View Related

HTC Desire Z :: Speaker / Earpiece Not Loud Enough

Nov 23, 2010

My speaker isn't loud enough - when the phone is ringing/when in speaker in a phonecall / when listening to music. Same goes for the earpiece volume - and the volume is at the maximum level.

View 1 Replies View Related

HTC Incredible :: Earpiece Paint Rubbing Off

Jul 8, 2010

The red paint on the earpiece of my DINC is rubbing off, ever so slightly.Anyone else experience this?

View 9 Replies View Related

Samsung Epic 4G :: Calls While Using Speakerphone

Sep 25, 2010

This is a really weird deal. A friend of mine got an Epic about the same time I did, and we talked a lot, with both of us using speakerphone, and it sounded great. But at some point it started messing up, when both of us were on speakerphone. We get this really loud chirping sound, that goes away, if one of us turns speaker phone off. My friend also has this problem when talking to his wife, who also has an Epic. I don't experience any problems using speakerphone during any other calls, nor does he, unless they are Epic to Epic with both parties using speaker phone. Just wondering if anyone else has experienced this odd behavior with their Epic? And if you haven't please try to test this out, with anyone else that has an Epic. At this point tech support doesn't have any other feedback, so I'm alone in the woods on this one.

View 6 Replies View Related

HTC Incredible :: Motorola T305 BT Car Speakerphone

May 18, 2010

I have an older Motorola T305 Bluetooth Car Speakerphone that I use in the rare event I need to take a call in the car. I've successfully paired the Incredible and I can dial on the phone itself and use the adapter for the most part.

What I can't figure out is how to get the phone to go to voice prompts when I press the "talk" button on the T305. I have had this unit paired with "dumb" phones aplenty - everything from an older RAZR, an LG ENV2 to a Moto W755. With every other phone, when I hit this button, I get a voice prompt that says "Please say a command". At that point I can either say "call" or "dial", but that doesn't seem to be the case with this phone.

Is there any app I need to run, or is this just a setting on the phone that I'm missing? Perhaps I just need a newer Bluetooth car adapter, not sure.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved