I'm using a custom camera application , i want the camera to enable the shutter sound if it was on on the device and turn it off otherwise , so is there a default method which will check that , or can i get the settings information of the camera to find that .
I tried this code , but it sounds that is check on the device sound.
AudioManager audioService = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
if (audioService.getRingerMode() != AudioManager.RINGER_MODE_NORMAL) {
Toast.makeText(MainActivity.this, "Normal", Toast.LENGTH_SHORT)
.show();
}