camera-preview icon indicating copy to clipboard operation
camera-preview copied to clipboard

Prevent plugin to use audio permission

Open jikseyres16 opened this issue 5 years ago • 5 comments

Describe the bug Don't know if a bug or not, I just want the camera functionality not the video, but on android it keeps informing to allow audio permission.

Expected behavior Just do not want to show the audio permission on first install.

Desktop (please complete the following information):

  • OS: Android
  • Version 10

Smartphone (please complete the following information):

  • Device: Samsung A50
  • OS: Android
  • Browser stock browser
  • Version 10

jikseyres16 avatar Oct 29 '20 09:10 jikseyres16

I think we can remove Manifest.permission.RECORD_AUDIO from CameraPreview.java to prevent audio permission request

arielhernandezmusa avatar Dec 06 '20 23:12 arielhernandezmusa

Thanks, that did the trick. 👍

jikseyres16 avatar Dec 09 '20 04:12 jikseyres16

Manifest.permission.RECORD_AUDIO still has not been removed from CameraPreview.java and installed the plugin version 1.2.0 causes the problem as described in this ticket. Here is the PR to fix this https://github.com/capacitor-community/camera-preview/pull/100

I assume that this Manifest.permission.RECORD_AUDIO should be requested when trying to record a video only.

ryaa avatar Feb 22 '21 12:02 ryaa

In v1.2.1 the Manifest.permission.RECORD_AUDIO is completely removed thus not being requested causing the plugin to fail when recording video (Android)

vkyeswa avatar May 20 '21 07:05 vkyeswa

In v1.2.1 the Manifest.permission.RECORD_AUDIO is completely removed thus not being requested causing the plugin to fail when recording video (Android)

This permission should not be always requested when the plugin starts. This was the initial implementation and I think that this bug has been introduced when the video support has been added to this plugin so I reverted it back. My assumption that this RECORD_AUDIO permission should be requested only when the plugin is going to start for video recording.

ryaa avatar May 21 '21 10:05 ryaa

It seems that this ticket can be closed as the required change has been merged and included into the latest release

ryaa avatar Mar 09 '23 06:03 ryaa

closing since the change was merged and released

jcesarmobile avatar Jun 08 '23 17:06 jcesarmobile