Alex Rivera | Logout

How to mute camera shutter sound on android phone

Asked 2012-04-30T11:39:45.477
21

Is there any way to mute the camera shutter sound in Android (not rooted phone)?

I use this code to mute my audio sound when taking picture:

  AudioManager mgr = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
    int streamType = AudioManager.STREAM_SYSTEM;
    mgr.setStreamSolo(streamType, true);
    mgr.setRingerMode(AudioManager.RINGER_MODE_SILENT);
    mgr.setStreamMute(streamType, true);

I mute the sound and silent the phone.

mCamera.takePicture(null, null, photoCallback); 

then take the picture

It's working on HTC HERO, HTC Desire, Motorola ME860, MotoA953. But when I tested it on Samsung Tab p1000 and Sony Experia R800i, it's not working. Is there any other work around?

Edit
Report

1 Answer

4

The method you've posted already is actually the best one I can find/think of. The reason it doesn't work is because it's not supposed to. In fact, in many places (most of Europe, Japan, parts of US, etc.) it's illegal to disable the shutter sound. This is so that you can't take pictures in places you're not supposed to, and so you don't take pictures of people without their permission, and so on. It's just a shot in the dark that the manufacturer has purposely tried to make sure you can't do it no matter what (though technically there's always a way), but when you think about it, logically there's no reason your code shouldn't work right? It's simple, basic, makes sense. Anyways, there are many silent camera apps out there and Camera+ ICS is actually built on the default ICS camera but has a Silent Shutter option so it must be possible.

answered 2012-05-16T14:50:26.637

Your Answer