This course is available as part of the raywenderlich.com Professional subscription. To learn more click here
Pro

Implementing Picture In Picture Mode In Android

Oct 8 2020 · Video Course (36 mins) · Advanced

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!

5/5 3 Ratings

Version

  • Kotlin 1.3, Android 10, Android Studio 4

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.

1

Check out the Emitron app, then set up the sample project with Firebase and build configuration.

2

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.

3

Extend your PiP mode functionality to your Fragment, and learn how to expose it through a BroadcastReceiver.

4

Build the functions of one of the core classes that will let you handle the PiP mode and communicate its state.

5

Add actions to the PiP container to display different media controls and prepare their actions.

6

Learn how to process media control by observing the PipAction value from the BroadcastReceiver, allowing the user to use the PiP mode completely.

7

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

Contributors

Comments