I want to capture video by simply opening default video recorder but sound must be disabled while capturing. Thanks in advance.
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
startActivityForResult(intent, RESULT_VIDEO_CAP);
There is nothing in the
ACTION_VIDEO_CAPTUREprotocol that affects audio. You are welcome to useAudioManagerand change audio settings yourself, but the third-party app that you are launching is also welcome to change the audio settings, and there is nothing that you can do about that.The only way to ensure that the audio settings are what you want is to record the video yourself with a
MediaRecorder.