get Phone Ring Volume - Android Phone

Android examples for Phone:Volume

Description

get Phone Ring Volume

Demo Code


//package com.java2s;

import android.content.Context;

import android.media.AudioManager;

public class Main {

    public static int getRingVolume(Context context) {
        return ((AudioManager) context
                .getSystemService(Context.AUDIO_SERVICE))
                .getStreamVolume(AudioManager.STREAM_RING);
    }//from ww w. ja v a2s  . c  o m
}

Related Tutorials