get Call Sound - Android Phone

Android examples for Phone:Sound

Description

get Call Sound

Demo Code


//package com.java2s;

import android.content.Context;

import android.media.AudioManager;

public class Main {

    public static int getCallSound(Context context) {
        int current = 0;
        try {/* w  w w . jav  a  2s. c om*/
            AudioManager manager = (AudioManager) context
                    .getSystemService(Context.AUDIO_SERVICE);
            current = manager
                    .getStreamVolume(AudioManager.STREAM_VOICE_CALL);
        } catch (Exception e) {
        }
        return current;
    }
}

Related Tutorials