[android-developers] Upload youtube videos by intent
Hello,
I googled this and found that the suggested way is as follows:
Intent ii = new Intent(Intent.ACTION_SEND);
ii.setType("video/3gp");
ii.putExtra(Intent.EXTRA_STREAM, uri);
ii.putExtra(Intent.EXTRA_TEXT, "Sample text" );
ii.putExtra(Intent.EXTRA_TITLE, "Mega video");
startActivity(Intent.createChooser(ii, "kerker"));
But I found it will throw NullPointer exception finally. The reproduce
procedure is listed below:
1. Trigger the intent above.
2. Select the Youtube app that is in the popup dialog to enter Youtube
video upload page.
3. Input the video title and description.
4. Click "Upload" button.
5. Popup one error dialog.
The log stack trace is below. Could someone give me some suggestions
or ideas? Thanks in advance.
02-10 17:33:13.625: ERROR/AndroidRuntime(10558):
java.lang.NullPointerException
02-10 17:33:13.625: ERROR/AndroidRuntime(10558): at
java.util.Calendar.setTime(Calendar.java:1290)
02-10 17:33:13.625: ERROR/AndroidRuntime(10558): at
java.text.SimpleDateFormat.formatImpl(SimpleDateFormat.java:730)
02-10 17:33:13.625: ERROR/AndroidRuntime(10558): at
java.text.SimpleDateFormat.format(SimpleDateFormat.java:1011)
02-10 17:33:13.625: ERROR/AndroidRuntime(10558): at
java.text.DateFormat.format(DateFormat.java:384)
02-10 17:33:13.625: ERROR/AndroidRuntime(10558): at
com.google.android.apps.uploader.clients.youtube.YouTubeSettingsActivity.a(Unknown
Source)
02-10 17:33:13.625: ERROR/AndroidRuntime(10558): at
com.google.android.apps.uploader.clients.SettingsActivity.b(Unknown
Source)
02-10 17:33:13.625: ERROR/AndroidRuntime(10558): at
com.google.android.apps.uploader.clients.c.run(Unknown Source)
02-10 17:33:13.625: ERROR/AndroidRuntime(10558): at
java.lang.Thread.run(Thread.java:1096)
Cheers,
NightGospel
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home