Search code examples
androidflutterpermissionscamera

how do manually remove microphone phone permission for camera plugin in flutter


Is it possible to remove asking microphone permission for camera plugin for android device using flutter

I have tried like below in my AndroidManifest.xml

but it shows error

Any one can help me to solve this issue. Thanks in advance


Solution

  • One important thing. enableAudio: false parameter can only be passed as the last parameter to the CameraController. Like below:

    _controller = CameraController(firstCamera, ResolutionPreset.medium,
        enableAudio: false);
    

    All other attempts will cause syntax error. Adding this one helps to avoid adding additional NSMicrophoneUsageDescription in info.plist. Otherwise app will crash with this error:

    "This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data."