Skip to content

[camerax] Add custom LifecycleOwner #125695

@camsim99

Description

@camsim99

The CameraX library depends on a LifecycleOwner to manage the lifecycle of the cameras it uses (see documentation for more information).

As of now, the android_camera_camerax plugin assumes that the Activity that the plugin is attached to is a LifecycleOwner. While this is true for FlutterActivity, this may not always be the case.

Thus, a custom LifecycleOwner implementation needs to be added to the plugin to handle the lifecycle states of the Activity if it is not already an implementation of LifecycleOwner.

See related comment: flutter/packages#3419 (comment)

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions