I'm currently using a BroadcastReceiver on
android.intent.action.PHONE_STATE to detect when an incoming call is
arriving.  Then, after checking a few user values, I attempt to alter
the ringer volume using the following code.


aMan = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
aMan.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
aMan.setStreamVolume(AudioManager.STREAM_RING,
aMan.getStreamVolume(AudioManager.STREAM_RING), 0);
Toast.makeText(context, "We Made It!", Toast.LENGTH_LONG).show();

This code works fine on several phones (N1, Evo, Droid) but a few it
doesn't work on (Epic 4g, Moment).  From my testing, it looks like
once the ringtone starts playing on those problem phones, the newly
adjusted ringer volume isn't taken into account.  Silent mode is
turned off and the ringer volume is turned up, but no ringtone can be
heard for the current incoming call.

Is there a way to fix this?  If I could get a reference to the global
ringtone and restart it somehow that would work.  Any thoughts you
have would be greatly appreciated.

Thanks!

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

Reply via email to