AudioManager audMgr = getSystemService(Context.AUDIO_SERVICE);
  int volume = audMgr.getStreamVolume(AudioManager.STREAM_MUSIC);
Change the argument to getStreamVolume accordingly.

On Mon, Mar 15, 2010 at 1:48 PM, kavitha <[email protected]> wrote:

> Hi All,
>
> I am developing an application of music player in android.
>
> I need to show volume control in my application.
>
> I saw as per documentation,Media Player volume is 0-1.
>
> I saw one method as 
> MediaPlayer.setVolume<http://developer.android.com/reference/android/media/MediaPlayer.html#setVolume%28float,%20float%29>(float
> leftVolume, float rightVolume)  to set the volume for mediaplayer.
>
> But I need to show current volume also in slider,,,there is no method to
> get current volume.
>
> Any idea how to get it???
>
> Thanks
> Kavitha
>
>
>
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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