This repository was archived by the owner on Feb 22, 2023. It is now read-only.
[camera] Check audio perm when opening on Android#823
Closed
sfanxiang wants to merge 1 commit intoflutter:masterfrom
Closed
[camera] Check audio perm when opening on Android#823sfanxiang wants to merge 1 commit intoflutter:masterfrom
sfanxiang wants to merge 1 commit intoflutter:masterfrom
Conversation
Since we always require both camera and audio permissions, it's better to check both in case the user rejected audio permissions alone.
Contributor
|
Hi @sfanxiang We check for audio permission in the constructor of Camera here: https://github.com/flutter/plugins/blob/master/packages/camera/android/src/main/java/io/flutter/plugins/camera/CameraPlugin.java#L316. Also, in our example app, it repeatedly asks for audio permissions if you don't give the camera permission. I know this PR is quite old now, but was there a specific situation where the app didn't ask for audio permissions for you? |
Author
|
@bparrishMines There used to be another code path to camera.open():
If it's no longer a problem feel free to close this PR. |
Contributor
|
You're right. I forgot we had a call to I will go ahead and close this. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since we always require both camera and audio permissions, it's better to
check both in case the user rejected audio permissions alone.