android mute camera shutter sound?

后端 未结 5 416
梦如初夏
梦如初夏 2020-12-09 19:11

I am using this

camera.takePicture(null, rawCallback, jpegCallback);

but with some devices it makes a sound when the camera captures the image.<

5条回答
  •  一生所求
    2020-12-09 20:08

    As harism mentioned, this is not possible to do on some devices, because there are legal requirements in some markets (Japan, for example) that taking a picture always results in an audible shutter sound.

    The stream type used for these types of sounds is STREAM_SYSTEM_ENFORCED, and there's a read-only system property that determines whether or not you can mute such a stream.

提交回复
热议问题