Ping. Nobody can help? On Wednesday, July 18, 2012 9:33:35 PM UTC+2, bt wrote: > > Hi, > > I have BroadcastReceiver which listens for PHONE_STATE_CHANGED actions. > In my test if phone state is RINGING then I set notification volume to 1 > else I set it to 5. > I have an observer that listens to changes > in Settings.System.VOLUME_SETTINGS[NOTIFICATION]. > > The following happens. When it is ringing then sets stream volume to 1 (it > is ok): > > 07-18 21:24:56.886: Broadcast received: android.intent.action.PHONE_STATE > 07-18 21:24:56.886: Phone state: RINGING > 07-18 21:24:56.916: setStreamVolume(5, 1, false) > > When it is idle then sets stream volume to 5 (it is still ok): > > 07-18 21:24:59.956: Broadcast received: android.intent.action.PHONE_STATE > 07-18 21:24:59.956: Phone state: IDLE > 07-18 21:25:00.016: setStreamVolume(5, 5, false) > > The volume changes well to 1 when phone is ringing but this second change > doesn't happen. > The volume setting changes only seconds later (the observer will receive > this event): > > 07-18 21:25:03.546: Settings changed: content://settings/system/, refresh: > VOLUME > > And If I get stream value for notification than it will be 1 instead of 5. > > Do somebody understand why the second call of setStreamVolume doesn't have > effect. > How can I set volume to work well? > > Thanks, > Tamas >
-- 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