Sign in to follow this  
sheep19

Get the device volume

Recommended Posts

I will explain my situation briefly:

Let's say I'm on my android phone and I set the volume to 0 (silent).
Then I start my application. Inside my app, I start playing music (using MediaPlayer).
I don't want the music to start playing - but it does, even though the phone is silenced. I'm not saying that's wrong.

[b]So what I want to do is to "get" the volume of the device[/b] (it would have to be 0 or 0.0 in this case) and set it using: audioManager.setStreamVolume().

How can I get that information?

Share this post


Link to post
Share on other sites
Just an FYI, android maintains 3 seperate volume levels. Ringer volume (which is what the silent mode refers to), Media volume (which I think is the only one apps can play with directly) and In call volume.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this