[android-developers] Re: Audio Volume

2009-03-10 Thread Dave Sparks
Please don't handle the volume keys yourself - it is almost impossible to guarantee that you won't break the behavior of the volume keys. Call this API in your onCreate(): setVolumeControlStream(AudioManager.STREAM_MUSIC); This tells the AudioManager that when your application has focus, the

[android-developers] Re: Audio Volume

2009-03-09 Thread LukeH
I ended up handling the volume button presses myself. The solution I used is documented here: http://stackoverflow.com/questions/628659/how-can-i-manage-audio-volumes-sanely-in-my-android-app On Mar 9, 7:39 pm, strazzere str...@gmail.com wrote: Then I'd recommend looking

[android-developers] Re: Audio Volume

2009-03-09 Thread LukeH
I'm a developer, I'm looking to change the behavior of my app, not install another app for changing the volume. I need some way to make it so that volume button presses always adjust the music stream volume when my activity is showing whether a sound is playing at the time or not. On Mar 9,

[android-developers] Re: Audio Volume

2009-03-09 Thread strazzere
Then I'd recommend looking here: http://sdk.androidin.com/reference/android/media/AudioManager.html More specifically; http://sdk.androidin.com/reference/android/media/AudioManager.html#setStreamVolume(int,%20int,%20int) audio.setStreamVolume(AudioManager.STREAM_MUSIC, #); On Mar 9, 10:22 

[android-developers] Re: Audio Volume

2009-02-03 Thread blindfold
My app generates and plays sound samples in one second bursts, and this context sensitive volume adjustment keeps flipping between ringtone volume and media volume depending on split second timing (apparently depending on whether a burst is playing or a next burst is in preparation when the

[android-developers] Re: Audio Volume

2009-02-02 Thread Jerry Yang
[mailto:android-develop...@googlegroups.com] On Behalf Of Phill Midwinter Sent: Monday, February 02, 2009 5:03 AM To: android-developers@googlegroups.com Subject: [android-developers] Re: Audio Volume Should be in android beginners? Volumes are distinct and context sensitive between the ringer

[android-developers] Re: Audio Volume

2009-02-01 Thread Phill Midwinter
Should be in android beginners? Volumes are distinct and context sensitive between the ringer and media. 2009/2/1 Bala california.b...@gmail.com In the Android phone, while I am watching YouTube videos, I may reduce the audio volume. Once I am done watching, I close all applications and