0

I am following this code for my camera application. But I am getting shutter sound on start and end of the recording, which I want to disable. I did changes mentioned here, but its not working. Please help!!

Community
  • 1
  • 1
Aashish J Kumar
  • 303
  • 4
  • 17

2 Answers2

4

I was also facing the same problem but the following snippet worked for me,

if (android.os.Build.VERSION.SDK_INT>=android.os.Build.VERSION_CODES.JELLY_BEAN_MR1){
              mCamera.enableShutterSound(false);

        }
        else{
                AudioManager audio= (AudioManager)this.getApplicationContext().getSystemService(Context.AUDIO_SERVICE);
                audio.setStreamVolume(AudioManager.STREAM_SYSTEM, 0,   AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE);
             }

Hope it will help you too.

Spring Breaker
  • 8,233
  • 3
  • 36
  • 60
1

On some devices(depends on market there it was sold) it is not possible at all. Nothing can help if it so.

Nick Moskalenko
  • 941
  • 9
  • 10