get Media Volume - Android Media

Android examples for Media:Media Volume

Description

get Media Volume

Demo Code


//package com.java2s;

import android.content.Context;

import android.provider.Settings;

public class Main {

    public static int getMediaVolume(Context context) {
        return Settings.System.getInt(context.getContentResolver(),
                "volume_music", 0);
        //            Settings.System.VOLUME_MUSIC, 0);
    }/* www .j a v a 2s . c om*/
}

Related Tutorials