Java tutorial
//package com.java2s; public class Main { private static android.media.AudioManager audio; public static int getRingtoneVolume() { if (audio != null) { return audio.getStreamVolume(android.media.AudioManager.STREAM_RING); } else { throw new IllegalStateException( "POITrackingUtil has not been initialized." + " First call POITrackingUtil.initialize()"); } } }