Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android][camera] Update documentation to note how to allow image streaming in the background #146935

Closed
camsim99 opened this issue Apr 17, 2024 · 1 comment · Fixed by flutter/packages#6741
Assignees
Labels
p: camera The camera plugin P1 High-priority issues at the top of the work list platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team

Comments

@camsim99
Copy link
Contributor

Starting at Android 14, in order to allow for background camera streaming, a foreground service permission TYPE_CAMERA needs to be specified in the apps's AndroidManifest.xml. Specifying TYPE_CAMERA will allow users to:

Streaming Continue to access the camera from the background. For example, video chat apps that allow for multitasking.

See the documentation on understanding foreground services for more information.

We should update the camera/camera README to include this information in case a developer wishes to allow for background streaming.

@camsim99 camsim99 added platform-android Android applications specifically p: camera The camera plugin team-android Owned by Android platform team labels Apr 17, 2024
@camsim99
Copy link
Contributor Author

We should also add the permission in the example app for visibility.

@camsim99 camsim99 added P1 High-priority issues at the top of the work list triaged-android Triaged by Android platform team labels Apr 26, 2024
@camsim99 camsim99 self-assigned this Apr 26, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this issue May 29, 2024
Adds notes in the camera/camera and camera/camera_android_cameraX READMEs about the used `WRITE_EXTERNAL_STORAGE` permission used in the plugin and the foreground service permission that is required to specify if you wish to allow image streaming in the background.

Fixes flutter/flutter#146935 and addresses flutter/flutter#131116 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: camera The camera plugin P1 High-priority issues at the top of the work list platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant