get Ringtone Max Sound - Android Phone

Android examples for Phone:Sound

Description

get Ringtone Max Sound

Demo Code


//package com.java2s;

import android.content.Context;

import android.media.AudioManager;

public class Main {

    public static int getRingtoneMaxSound(Context context) {
        int max = 0;
        try {/*www . j  ava  2s  .  c o m*/
            AudioManager manager = (AudioManager) context
                    .getSystemService(Context.AUDIO_SERVICE);
            max = manager.getStreamMaxVolume(AudioManager.STREAM_RING);
        } catch (Exception e) {
        }
        return max;
    }
}

Related Tutorials