get Max Music Volume - Android Media

Android examples for Media:Media Volume

Description

get Max Music Volume

Demo Code


//package com.java2s;

import android.content.Context;

import android.media.AudioManager;

public class Main {

    public static int getMaxMusicVolume(Context context) {
        AudioManager am = (AudioManager) context
                .getSystemService(Context.AUDIO_SERVICE);
        int audioMaxVolum = am
                .getStreamMaxVolume(AudioManager.STREAM_MUSIC);
        return audioMaxVolum;
    }/*from w w  w. j  av  a  2 s.c o m*/
}

Related Tutorials