Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upload video to Youtube via android studio

I'm a new programmer in Android studio.

I am trying to create a button that gets a file location and uploads it to my youtube account:

I succeeded to get a video file's directory in my android code:

File mediaFile = 
    new File(Environment.getExternalStorageDirectory().getAbsolutePath()....)

I added a button that calls UploadToYoutube function.

Now I would like to upload it to my youtube account through the file path I have.

Can someone direct me?

Any help appreciated!

like image 802
Alon Shmiel Avatar asked Apr 06 '15 19:04

Alon Shmiel


1 Answers

My suggestion:

Get Start

Obtaining authorization credentials

  • https://developers.google.com/youtube/registering_an_application?hl=en

Implementing OAuth 2.0 Authentication

  • https://developers.google.com/youtube/v3/guides/authentication?hl=en

YouTube API: Client Libraries

  • https://developers.google.com/youtube/v3/libraries?hl=en

Using google-api-java-client:

  • https://github.com/google/google-api-java-client

    Next step:

Use YouTube Data API (v3)

Sources Examples in

Post a channel bulletin

Create and manage YouTube video caption tracks

Add a featured video

Retrieve my uploads

Create a playlist

Search by keyword

Search by topic

Search by geolocation

Add a channel subscription

Upload a video thumbnail image

Upload a video << Example code in java : )

Update a video

like image 183
Dexter Avatar answered Oct 21 '22 07:10

Dexter