get Ring Volume - Android Media

Android examples for Media:Audio

Description

get 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);
    }//  www.  j  av a 2s .  c o m
}

Related Tutorials