Kotlin

Overview

This tutorial walks through how to add Picture-in-Picture to a Vonage Video Android app. Picture-in-Picture lets users minimize your video call into a small floating window while using other apps. The sample:

  • Connects to a Vonage session and shows publisher and subscriber video
  • Provides an Enter Picture-In-Picture button
  • Enters PiP with a 9:16 aspect ratio
  • Hides the local publisher preview in PiP (subscriber video stays visible)
  • Keeps the session alive while the activity is in PiP

Publishes white noise (random audio signal) to the stream. Estimated completion time: 25 mins

Want to skip this tutorial? You can jump straight to the completed Kotlin client code in the PictureInPicture folder of our Android sample app repo on GitHub. The repo includes a README with full documentation on how to run and explore the project. This tutorial focuses on the Kotlin version of the Android sample app. For the Java version, check the Previous sample app repo.

For Picture in picture details check the official Android PiP Documentation.

Requirements

To complete this tutorial, you’ll need: