I am using PhoneStateListener and TelephonyManager to get call state
and do specific operations based on the call state.

Now as soon as I get a call and control goes to Ringing, my phone goes
to silent mode. Please see below the code sample I am using to do
this:


telephonyManager = (TelephonyManager) this.getApplicationContext()
                                        
.getSystemService(Context.TELEPHONY_SERVICE);

// Create a new PhoneStateListener
phoneListener = new PhoneStateListener() {
@Override
public void onCallStateChanged(int state, String incomingNumber) {
AudioManager am = (AudioManager)
getSystemService(Context.AUDIO_SERVICE);                        switch (state) {
        case TelephonyManager.CALL_STATE_IDLE:
                case TelephonyManager.CALL_STATE_OFFHOOK:
                        Log.d(TAG, "OFFHOOK");
                break;
        case TelephonyManager.CALL_STATE_RINGING:
                                Log.d(TAG, "onCreate: Call State
Ringing and ring = "                                                            
+
am.getStreamVolume(AudioManager.STREAM_RING));
}
}

Has anyone else seen this problem before? This is an urgent request..
So please help me.

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