get Call Max Sound - Android Phone

Android examples for Phone:Sound

Description

get Call Max Sound

Demo Code


//package com.java2s;

import android.content.Context;

import android.media.AudioManager;

public class Main {

    public static int getCallMaxSound(Context context) {
        int max = 0;
        try {// w ww  .  j  av  a2s  .co m
            AudioManager manager = (AudioManager) context
                    .getSystemService(Context.AUDIO_SERVICE);
            max = manager
                    .getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL);
        } catch (Exception e) {
        }
        return max;
    }
}

Related Tutorials