Hi,

I'm trying to figure out how to set the speaker phone to on when the phone call 
state changes. I have something like the following:

        class TelephoneListener extends PhoneStateListener {

                public void onCallStateChanged(int state, String incomingNumber)
                {
                        super.onCallStateChanged(state, incomingNumber);
                        switch (state)
                        {
                        case TelephonyManager.CALL_STATE_OFFHOOK:
                                //CALL_STATE_OFFHOOK;
                                // Set audio to 0 and remove sound and vibrate
                                        AudioManager mAudioManager = 
(AudioManager) getSystemService(AUDIO_SERVICE);
                                        mAudioManager.setSpeakerphoneOn(true);

I was wondering if this is possible or not. I don't have any errors, but I 
don't have any joy either... I have searched for setSpeakerPhoneOn and haven't 
come up with anything other than permissions which I have set up in my Manifest.

Cheers,
Julius.

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