Can I use picture in-picture-mode with single Activity Jetpack Compose?

297 views Asked by At

My application uses Jetpack Compose code all contained in a single activity without fragments. I'd like to develop a picture-in-picture feature for a video chat feature.

When video chat is started, user will see remote camera stream on full screen, and his local camera stream inside a picture-in-picture box. After user clicks on a chat icon, chat Composable (screen) should be shown that takes up full screen, and remote camera stream should be visible inside the picture-in-picture box. User can then restore the full screen video chat from the picture-in-picture box.

I'm having problem understanding whether it is possible to do as described in a single activity because picture-in-picture feature will put the whole activity inside the picture-in-picture, and I cannot show any other composable UI on the screen underneath.

I assume that my solution can either be done by starting another activity, or creating custom draggable picture-in-picture box for my local/remote camera streams.

0

There are 0 answers