Volume Idon in Status Bar won't change.

Put your problem here if it does not fit any of the other categories.

Volume Idon in Status Bar won't change.

Postby tsucheck » Sun Feb 17, 2008 2:27 am

Hello,

I've been struggling with this problem for a while. I would like to change the volume of the ringer. I tried the following code:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  AudioSystem.setVolume(AudioSystem.STREAM_RING, AudioSystem.MIN_VOLUME);
  2.  
  3.  android.provider.Settings.System.putInt(this.getContentResolver(),  "ringer_volume", AudioSystem.MIN_VOLUME);
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


And it this case it sets the ringer to 0. So when I call (from the telnet session) I don't hear the ring. However the icon on the status bar used for indicating the current setting of the volume does not always update. Similar goes if I try to set the volume to vibrate. Lastly, if I start the emulator and originally the volume is half of the maximum (in the little volume circle indicator graphic) and my application starts. The volume is now 0, as mentioned above. When I use the volume buttons to increase it, one would expect that it would start from 0 but its suddently at the middle of the maximum, as before my application was lunched.

I'm not sure if capability to adjust the ringer volume as I describe here is available and I'm just not getting it or if its brocken. Any information you guys could provide is appreciated. I posted a similar quary in the Google development groups but didn't get anything meaningfull. Looks to me like you guys have a lot more useful information here.

Thanks.

Tom
tsucheck
Developer
Developer
 
Posts: 29
Joined: Sun Feb 17, 2008 2:07 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 22 guests