Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 220.127.116.11 release ready!
Owner and Founder. Opencart
Picture In Picture is a new feature introduced in the Android 8.0 (API level 26). It is a multi-window mode which is mostly used for video playback. A small screen starts to float in the device screen and the user can do other work while watching the small screen. This screen appears on the topmost layer and the user can drag it to any corner they want. You can check the Google Developers Docs for details
1) Activities do not support PIP mode by default. To make them support this feature we need to add a few attributes in the activity tag in your AndroidManifest.
So, after adding these your activity tag will look something like this.
2) To start the PIP mode you need to call enterPictureInPictureMode() function according to your need. Either you can call it when the user hits the home button that means in onPause() or when the user presses the back button.
To define the dimensions of the small screen, you need to pass a Rational object to the function.
3) As the application enters or exits the PIP mode, onPictureInPictureModeChanged() function is called. You can make the changes in the UI according to the screens.
4) This is how the PIP mode will look like.
You can use this to show videos on a small screen or you can also use it to show navigation. Make sure you have less number of UI components when in PIP mode.
That’s all for this blog. Thank you very much. This is Vedesh Kumar signing off.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
The support is fast and do everything in their power to make it perfect. If you need customization it's also done right away. I had massive research to select Mobikul and now I'm sure it was the right one.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.