Reputation: 589
How can I have PiP mode while I am still in the App? I am creating a video calling App, and while the call is still going on, you are able to go to a separate full screen view that currently is the same Fragment with the views being hidden/shown. When I go to separate full screen view, the cameras are no longer visible. We would like to solve that issue by putting the cameras in PiP mode. I see that the google meet app does that. But I could not find any reference to how to do this on the web.
Example of what I am trying to do:
Upvotes: 0
Views: 1154
Reputation: 641
You can open your app in another task. That way, you can have native Pip for call screen and surf your application.
For example, for setting another task for your screen inside your app:
<activity
...
android:taskAffinity="com.example.myapp.calls"
/>
Upvotes: 0
Reputation: 589
Android does not provide native solution to this problem. Instead I used a touch listener to listen for drag and drop events my self. There are multiple tutorials on this topic.
Upvotes: 0