0
 
 
		// Sound device 
		AudioManager audioManager = (AudioManager) ct.getSystemService(Context.AUDIO_SERVICE);
		if (audioManager != null) {
			results.put("Sound system volume", String.valueOf(audioManager.getStreamVolume(AudioManager.STREAM_SYSTEM)));
			results.put("Sound music volume", String.valueOf(audioManager.getStreamVolume(AudioManager.STREAM_MUSIC)));
			results.put("Sound alarm volume", String.valueOf(audioManager.getStreamVolume(AudioManager.STREAM_ALARM)));
			results.put("Sound ring volume", String.valueOf(audioManager.getStreamVolume(AudioManager.STREAM_RING)));
			results.put("Sound voice call volume", String.valueOf(audioManager.getStreamVolume(AudioManager.STREAM_VOICE_CALL	)));
			results.put("Sound notification volume", String.valueOf(audioManager.getStreamVolume(AudioManager.STREAM_NOTIFICATION)));
			results.put("Sound DTMF volume", String.valueOf(audioManager.getStreamVolume(AudioManager.STREAM_DTMF)));
			results.put("Max sound system volume", String.valueOf(audioManager.getStreamMaxVolume(AudioManager.STREAM_SYSTEM)));
			results.put("Max sound music volume", String.valueOf(audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC)));
			results.put("Max sound alarm volume", String.valueOf(audioManager.getStreamMaxVolume(AudioManager.STREAM_ALARM)));
			results.put("Max sound ring volume", String.valueOf(audioManager.getStreamMaxVolume(AudioManager.STREAM_RING)));
			results.put("Max sound voice call volume", String.valueOf(audioManager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL	)));
			results.put("Max sound notification volume", String.valueOf(audioManager.getStreamMaxVolume(AudioManager.STREAM_NOTIFICATION)));
			results.put("Max sound DTMF volume", String.valueOf(audioManager.getStreamMaxVolume(AudioManager.STREAM_DTMF)));
 
			int audioStatus = audioManager.getMode();
			switch (audioStatus) {
			case AudioManager.MODE_NORMAL :
				results.put("Audio mode", "Normal");
				break; 
			case AudioManager.MODE_RINGTONE :
				results.put("Audio mode", "Ringtone");
				break; 
			case AudioManager.MODE_IN_CALL :
				results.put("Audio mode", "In call");
				break; 
			case AudioManager.MODE_IN_COMMUNICATION :
				results.put("Audio mode", "In communication");
				break; 
			case AudioManager.MODE_INVALID :
				results.put("Audio mode", "Invalid");
				break; 
			} 
			// Sound flags 
			results.put("Wired eadsets", String.valueOf(audioManager.isWiredHeadsetOn()));
			results.put("Bluetooth Sco", String.valueOf(audioManager.isBluetoothScoOn()));
			results.put("Bluetooth Sco available off call", String.valueOf(audioManager.isBluetoothScoAvailableOffCall()));
			results.put("Microphone muted", String.valueOf(audioManager.isMicrophoneMute()));
			results.put("Music active", String.valueOf(audioManager.isMusicActive()));
			results.put("Speaker phone", String.valueOf(audioManager.isSpeakerphoneOn()));
			results.put("Bluetooth A2dp speaker", String.valueOf(audioManager.isBluetoothA2dpOn()));
		} else { // Errors getting info about Sound device