Hi,

I'm trying to record the audio from my motorola S9 BT headset on
Samsung froyo 2.2.
When I call someone with this headset paired, I can listen and talk
trought the this.
So, I try a to do a little apk: I still listen trought BT headset, but
the voice is automatically recorded from the internal mic.
How can I set the source audio from the BT headset?

This is the code..
Cheers

private void audioRecordStart() {

                aManager = 
(AudioManager)getSystemService(Context.AUDIO_SERVICE);
                aManager.setMode(AudioManager.MODE_CURRENT);
                aManager.setSpeakerphoneOn(false);
                aManager.setMicrophoneMute(true);
                aManager.startBluetoothSco();
                aManager.setBluetoothScoOn(true);

                Log.i("AUDIO","A2dpON "+aManager.isBluetoothA2dpOn());
                Log.i("AUDIO","ScoAvailableOffCall
"+aManager.isBluetoothScoAvailableOffCall());
                Log.i("AUDIO","ScoOn "+aManager.isBluetoothScoOn());

                mRecorder = new MediaRecorder();
        
mRecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
        
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
                mRecorder.setOutputFile(mFileName);
                mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);

                try {
                    mRecorder.prepare();
                } catch (IOException e) {
                    Log.e("PAROV", "prepare() failed");
                }

                mRecorder.start();
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to