did you tried:
float streamVolume =
mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
streamVolume = streamVolume /
mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
On Aug 26, 10:41 pm, Neilz <[email protected]> wrote:
> I'm having very mixed experiences with this.
>
> In the play() method, the docs state:
>
> leftVolume left volume value (range = 0.0 to 1.0)
> rightVolume right volume value (range = 0.0 to 1.0)
>
> But if I get the max volume for a device (which is usually 15) setting
> the volume to 15 gives a louder output than it does by setting it to
> 1.0. Which is just weird.
>
> However to confuse matters, on the HTC Hero, the max volume gets
> returned as 16. If I set the volume to 16, nothing gets played at all
> - I have to reduced it to 15. Which is fine, except that there's no
> guarantee that this will work for all devices. So I'm left at setting
> it to 1.0 and suffering lower volumes.
>
> Hmmm. :-/
--
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