get Music Max Index - Android Media

Android examples for Media:Media Volume

Description

get Music Max Index

Demo Code


//package com.java2s;
import android.content.Context;
import android.media.AudioManager;

public class Main {
    public static int getMusicMaxIndex(Context mContext) {
        AudioManager audioManager = (AudioManager) mContext
                .getSystemService(Context.AUDIO_SERVICE);
        return audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
    }/* www . j a v  a 2  s.co m*/
}

Related Tutorials