【发布时间】:2014-10-16 19:24:31
【问题描述】:
我正在实施以下解决方案Play a video in Glass
Intent i = new Intent();
i.setAction("com.google.glass.action.VIDEOPLAYER");
i.putExtra("video_url", "...");
startActivity(i);
但是我遇到了 401 错误。
要进行身份验证,我需要在标题中包含我的键/值对。
我该如何做呢?
10-16 14:58:55.229 126-10199/? I/ChromiumHTTPDataSourceSupport﹕ Server responded with http status 401
10-16 14:58:55.229 126-10470/? I/AwesomePlayer﹕ mConnectingDataSource->connect() returned -1004
10-16 14:58:55.229 10175-10216/? E/MediaPlayer﹕ error (1, -1004)
10-16 14:58:55.237 10175-10197/? W/VideoPlayer﹕ Failed to start playback.
java.io.IOException: Prepare failed.: status=0x1
at android.media.MediaPlayer.prepare(Native Method)
at com.google.glass.videoplayer.VideoPlayer$4.serialDoInBackground(SourceFile:577)
at com.google.glass.videoplayer.VideoPlayer$4.serialDoInBackground(SourceFile:463)
at com.google.glass.async.SerialAsyncTask.doInBackground(SourceFile:59)
at android.os.AsyncTask$2.call(AsyncTask.java:302)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at com.google.glass.async.PriorityThreadFactory$1.run(SourceFile:39)
at java.lang.Thread.run(Thread.java:841)
【问题讨论】:
标签: android android-intent google-glass google-gdk