androidandroid-studioyoutube-apiandroid-youtube-api

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!


Solution

  • My suggestion:

    Get Start

    Obtaining authorization credentials

    Implementing OAuth 2.0 Authentication

    YouTube API: Client Libraries

    Using google-api-java-client:

    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