get Max Ring Volume - Android Media

Android examples for Media:Media Volume

Description

get Max Ring Volume

Demo Code


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

import android.media.AudioManager;

public class Main {
    public static int getMaxRingVolume(Context context) {
        AudioManager audioManager = (AudioManager) context
                .getSystemService(Context.AUDIO_SERVICE);
        int maxVolume = audioManager
                .getStreamMaxVolume(AudioManager.STREAM_RING);
        return maxVolume;
    }/*  w ww  .  j ava  2s  .  c  om*/
}

Related Tutorials