PictureInPicturePlayground is an Open Source PiP Demo

Android N is now available to download on the Nexus Player and that adds a lot of new features to the OS, one of which is picture in picture (PiP). Like multi-window, more than a single app can appear on a screen at the same time. However, this second app is supposed to be a video which runs in a corner of the screen. This makes it easier for a user to keep watching a video as they browse for another video.


Video demo of PiP (at 0:42)

Developer hitherejoe, the same who created the Vine client Vineyard for Android TV, has published a new open source project on GitHub. Users can pull it and compile the app through Android Studio. The app lets users pick between two looping timelapses and place those videos in PiP mode. Then you’re able to navigate through the OS while still watching that video.

For developers, the code to integrate this feature in their app is not very elaborate. Key elements are adding attributes to your manifest stating your activity supports picture-in-picture and then override methods to handle the PiP lifecycle. Hitherejoe has a blog post explaining how he wrote the app in greater detail.

If you’re building a media app, you should look at the project’s code to figure out how to integrate PiP in your own projects.

Nick Felker

Nick Felker

Nick Felker is a student Electrical & Computer Engineering student at Rowan University (C/O 2017) and the student IEEE webmaster. When he's not studying, he is a software developer for the web and Android (Felker Tech). He has several open source projects on GitHub (http://github.com/fleker)Devices: Moto G-2013 Moto G-2015, Moto 360, Google ADT-1, Nexus 7-2013 (x2), Lenovo Laptop, Custom Desktop.Although he was an intern at Google, the content of this blog is entirely independent and his own thoughts.

More Posts - Website

Follow Me:
TwitterLinkedInGoogle PlusReddit

  • sodsavage

    Having the ability to Force Stop and Restart a app from it’s homescreen icon needs to happen.