Upload Video from android to youtube? [closed]
We don’t allow questions seeking recommendations for books, tools, 开发者_如何学Pythonsoftware libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this questionI need to upload the video from android application to youtube. I don`t know how to upload the video , in what format i have to upload or any way to convert and upload the Video.
If there is any API or UI is available to upload the Video to Youtube, is it possible or not?
Thanks.
Yeah the youtube apis support uploading video.
This is what I use to send threw default Gmail:
Log.d("Share Example", "Share button is clicked"); String outputFile = "/sdcard/in.mp4"; Log.d("Share Example", "outputFileURL: " + outputFile);
ContentValues content = new ContentValues(4);
content.put(Video.VideoColumns.TITLE, "My Test");
content.put(Video.VideoColumns.DATE_ADDED,
System.currentTimeMillis() / 1000);
content.put(Video.Media.MIME_TYPE, "video/mp4");
content.put(MediaStore.Video.Media.DATA, outputFile);
ContentResolver resolver = getContentResolver();
Uri uri = resolver.insert(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,
content);
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("video/*");
intent.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(Intent.createChooser(intent, "Share using"));
I was having the same problem. I did not have a profile for my youtube account so I decided to go to a computer and sign in with my email and then I filled out my profile information and added a username, (not my email that I signed in with) then once I created and saved the name, I was able to successfully upload a video. Worked on galaxy s2 and evo 3d so I think it should work on everyone else's.
精彩评论