Using PiP to continue playback in the background
The first step before we can use PiP in our project is that we must declare support for it in our AndroidManifest.xml
file. This step is crucial for informing the Android system that our PlaybackActivity
class is capable of running in PiP mode. We do this like so:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android = "http://schemas.android.com/apk/res/android"> <application> <activity android:name = "com.packt.playback.presentation .PlaybackActivity" android:supportsPictureInPicture...