Picture inside Picture (PiP)
What isPiP and Why PiP is used?
Picture-in-Picture (PiP) is a feature available on Android smartphones running Android 8.0 Oreo and later. It is one of Android Oreo’s big new features that lets you see two apps at once. It allows you to multitask. For instance, you can search for a restaurant while video chatting with a friend or watch a YouTube video while getting directions on Google Maps. You will be watching a YouTube video or Google Map Navigations on a pop-up window in our Home Screen.
When you open an app in multi-window and return to the home
screen, a visible sliver of the app remains up top, letting you see which app
you had opened. You can pull down on the black bar to preview the app’s
contents, or expand it to fill the screen. Apps need to be updated to support
the capability, but the necessary changes are relatively simple. Right now,
YouTube, VLC, and Chrome support PiP, but now that Oreo is rolling out to
devices, other major video or independent apps shouldn’t be far behind.
Where it is used?
It can be a
little tricky setting it up on your phone. Developers have to implement
picture-in-picture mode on a case-by-case basis.
We’ve compiled a list of popular
supported apps so far,
- VLC for Android
- Google Maps
- Google Duo
- WhatsApp (beta)
Each app may use a slightly different process to open a PIP
window. For example, Chrome requires you to watch a video in fullscreen mode,
while YouTube does it whenever any video is playing. VLC requires you to tap
the menu button during video playback and select the PIP option. But the
controls once you invoke the floating window are the same.
Where it can be used?
It can be implemented on
only certain apps not on all apps. This is because PiP mode is for independent
apps. The content that is played should not have any major dependency on user
only on such apps it can be implemented.
Some apps types in which PiP mode can be implemented,
- Any Video call feature
- Any video player feature
- Voice Recorder
- Calender view or Calender task view
- Location Tracking
- Play music
- Hotstar/ Jio/ Airtel or any Tv
- Any live Telecasting
- Crichuzz (Live score updation)
How to Launch PiP?
There isn’t a predictable way to launch
picture-in-picture mode. Most apps switch to a floating window view with a
tap of Android’s home button or back button but that’s not always the case. As
I already mentioned PiP mode can be customized in different ways.
To figure out how to launch an app’s
picture-in-picture mode, you’ll have to play around in the app or the app’s
Configure PiP on your Mobile
Pip mode should be enabled by
default, if not follow the steps give:
- Go to Settings on your smartphone or tablet.
Apps and Notifications
Special App Access > Picture-in-picture.
Then you will get a
view list of apps that support PiP mode and which had PiP enabled. To disable this feature on a
particular app, tab on an app and slide Allow picture-in-picture toggle to Off position.
Implementation of PiP on Maps(For Developers)
- Add Dependencies (Google-play-service-Maps) into the
Gradle app file.
- Generate Map API online.
- Add that API key to your Manifest file.
- Add Fragment to the xml to display Map.
- Add User permissions on Manifest file.
Adding PiP mode Coding level
- Enable PiP to “True” in manifest under the respective Activity.
- In MainActivity create a function onBackPressed() to display the app in pip mode on
click of the android back button.
- Now call the PiP
- We can customize
the PiP window size and controls.
How to use PiP Controls?
mode puts several simple and easy controls on the pop up window like playback
controls front and center. Tap on the PiP window and you’ll see play, fast
forward, and rewind buttons, and a center button that maximizes the app for
video player and Close, fullscreen, Settings for Permissions.. If you’re
watching a video from YouTube or VLC, you’ll get a headphone shortcut that
plays the video in the background. And if you’re watching a playlist, tapping
the fast forward button skips to the next video in the list. When you’re done
with the playback controls, tapping on the window again hides them.
The picture-in-picture window is
moveable. Tap, hold, and drag to move it to any part of your phone or tablet’s
screen, and lift your finger to release it. If you let go somewhere in the
middle, the window snaps to the closest valid location.
When you’re ready to dismiss it, a
simple tap, hold, and drag to the bottom of the screen does the trick.
- Picture-in-picture mode might be useful for
multitasking, but it can be annoyingly easy to trigger by mistake. Luckily, you
can disable picture-in-picture mode on a per-app basis.
- PiP is also convenient if you want
to casually watch a video rather than pay full attention, such as a funny video
that’s taking too long to get to the punchline.
Keep Updating Keep Growing!!