Summary
In this chapter, we tackled the essentials of extended video playback on Android, focusing on making our app more engaging by allowing videos to play in other contexts. We covered two main areas: PiP mode and media casting, both aimed at keeping our users connected to their content, whether they’re multitasking on their device or looking to enjoy videos on a larger screen.
Starting with PiP, we walked through how to enable a video to continue playing in a small window while users navigate away from the app. This section detailed everything from modifying your app’s manifest to implementing PiP mode, ensuring users won’t have to pause their viewing experience when they need to use another app.
Next, we shifted focus to media casting, particularly with MediaRouter
and the Cast SDK for devices such as Google Chromecast. Here, you learned how to let users send video from their mobile device to a TV. We discussed using MediaRouteButton
for easy device...