hi,
try to get the instance of AudioManager by using the code:
Context.getSystemService(Context.AUDIO_SERVICE)

n then try and use the methods given... i guess that'll work... provide
appropriate control buttons/graphical interfaces for the same...

visit:
http://developer.android.com/reference/android/media/AudioManager.html for
more info!

On Thu, Jun 4, 2009 at 11:35 AM, Josh <[email protected]> wrote:

>
> Im using a mediaPlayer to play sounds in my application. I want the
> user to be able to adjust the volume by using the hardware buttons on
> the device. I tried putting this in my oncreate
> (setVolumeControlStream
> (AudioManager.STREAM_MUSIC);) but it didnt seem to work. Anytime i
> press the hardware buttons on the emulator or an actual phone hothing
> happens. the volume doesnt change and i dont see the volume leve
> appear on the screen. Every other app i have used works just fine
> except for mine. Is there
> something else I have to do to allow the user to be able to adjust the
> volume using the hardware buttons?
>
>
> >
>

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