In this tutorial we'll do some steps, like :
- Browse the video in your phone gallery
- Select the video
- Play the video in VideoView before uploading
- Upload the video to youtube
For easy to understanding, i created a method for every function, hope you'll get what is the process look likes
Now let's create the layout, give it name activity_main.xml, and then paste the following code :
We used VideoView for display and play the video.
In your java class, there are some method that will called during the process, there are :
1. Select the video from gallery and displaying on the VideoView
2. Generate the video path from gallery
3. Get Content URI From path and share video to youtube
There are the method that i created in this project, hope your understand the process from the begin until the end (Video uploaded).
Here the full code :
That's all tutorial about how to upload/share video to youtube from your android application. Hope it helps
EmoticonEmoticon