Your next career begins with
Save 50% off your seat in our next iOS Bootcamp. Limited time only. Sessions start April 3.
Implementing Picture In Picture Mode In Android
Implement Picture In Picture mode to allow users to watch videos even while they use other apps. See how a real-world app uses PiP, then learn how to add awesome media playback controls to PiP mode for ease of use! By Filip Babić.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Learning path
This is part of the Android UI & UX: Beyond the Basics learning path. View path.
Who is this for?
Intermediate and advanced Android developers looking to implement Picture In Picture (PiP) mode to provide cool ways for users to keep using their apps while working on other things with their phone.
You should be familiar with Android Studio and Kotlin. Knowledge about using advanced code structures to build different layers in your apps and communicate between them is welcomed.
This course covers a feature from the raywenderlich.com app! Check out the open-source repo here.
Covered concepts
- Android Screen Resizing
- Multi-tasking Android apps
- Picture-In-Picture mode in Android
- Picture-In-Picture Parameters
- Picture-In-Picture Lifecycle
- Configuration Changes
- BroadcastReceivers
- MediaPlayer
- MediaPlayer Actions
Part 1: Implement Picture In Picture Mode
Picture In Picture allows users to control an app while they're doing something else! Learn the basics about PIP mode and how it changes the way users can interact with your apps.
Check out the Emitron app, then set up the sample project with Firebase and build configuration.
Learn how to enable PiP mode for Activities through the Android Manifest, and how to enter the PiP mode & attach it to the Activity lifecycle.
Extend your PiP mode functionality to your Fragment, and learn how to expose it through a BroadcastReceiver.
Build the functions of one of the core classes that will let you handle the PiP mode and communicate its state.
Add actions to the PiP container to display different media controls and prepare their actions.
Learn how to process media control by observing the PipAction value from the BroadcastReceiver, allowing the user to use the PiP mode completely.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development — plans start at just $19.99/month! Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.
Learn more