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
If we want to show the video to our android application then we do not store the video inside the project, this will increase the app size. So instead, we can upload the video to YouTube and stream it in the app to decreases the app size.
So In this blog,
I have shown you how to play the video in your own android app.
We have been already interacting with Google APIs, So we need to get the Google Developer API Key first.
Follow below steps to obtain your Google Developer Android API Key.
Open the layout file of your activity (activity_main.xml) and add below code. This creates a simple layout with YouTubePlayerView.
A view for displaying YouTube videos. Using this View directly is an alternative to using theYouTubePlayerFragment. If you choose to use this view directly, your activity needs to extend YouTubeBaseActivity.
To get started, place this view in your view hierarchy and call initialize(String, OnInitializedListener) to create a YouTubePlayer which you can use to load videos into this View.
This view will save and restore the state of the YouTubePlayer associated with the view as part of the onSaveInstanceState/onRestoreInstanceState flow.
This activity also contains few initialization listener methods to know the status of the youtube player.
Maybe this tutorial is worked for you.
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.