Kotlin

Enable Picture-in-Picture on Your Activity

On the activity that hosts the video call, set PiP and resize attributes and handle configuration changes so the activity is not recreated when entering PiP:

<activity
    android:name=".MainActivity"
    android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
    android:exported="true"
    android:resizeableActivity="true"
    android:supportsPictureInPicture="true"
    android:theme="@style/Theme.PictureInPicture">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>
Attribute Purpose
supportsPictureInPicture Declares that this activity may enter PiP
resizeableActivity Required for multi-window / PiP on many devices
configChanges Avoids destroying the activity on size/orientation changes in PiP