I am building a Jetpack Compose application and need to extend an Activity (e.g., BrightcovePlayer) to handle specific logic and states. My goal is to integrate this custom Activity into a Jetpack Compose screen using AndroidView.
For example, I want to create a class that extends an Activity, manage its states and lifecycle from there, and then embed its functionality into my Compose-based UI. How can I properly achieve this with AndroidView?
Here's an outline of what I am trying to do:
- Extend a custom Activity. Use it with AndroidView in a Compose screen. Ensure lifecycle and state management works correctly within the Compose framework.
Any guidance, examples, or best practices would be greatly appreciated!