get Ringtone Sound - Android Phone

Android examples for Phone:Sound

Description

get Ringtone Sound

Demo Code


//package com.java2s;

import android.content.Context;

import android.media.AudioManager;

public class Main {

    public static int getRingtoneSound(Context context) {
        int current = 0;
        try {//from www .  j  a  v a2s. c  o m
            AudioManager manager = (AudioManager) context
                    .getSystemService(Context.AUDIO_SERVICE);
            current = manager.getStreamVolume(AudioManager.STREAM_RING);
        } catch (Exception e) {
        }
        return current;
    }
}

Related Tutorials