视频网址我有以下代码来查看远程托管的视频文件:Intent.ACTION_VIEW不工作的冰淇淋三明治
startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse(article.getLink())));
其中getLink()
返回与本文相关的视频的URL。
这种方法在Gingerbread以上的设备上工作正常,但我最近一直在ICS上测试应用程序,并发现一个问题。 ICS浏览器开始加载URL,我在导航栏中看到它,但几乎立即浏览器关闭,我又回到我的应用程序的活动。
我得到下面的堆栈跟踪,当它发生:
11-28 10:24:44.488: E/SurfaceTexture(116): [com.mypackage.myapp/com.mypackage.myapp.MyVideoActivity] connect: already connected (cur=2, req=2)
11-28 10:24:44.488: E/ViewRootImpl(25384): IllegalArgumentException locking surface
11-28 10:24:44.488: E/ViewRootImpl(25384): java.lang.IllegalArgumentException
11-28 10:24:44.488: E/ViewRootImpl(25384): at android.view.Surface.lockCanvasNative(Native Method)
11-28 10:24:44.488: E/ViewRootImpl(25384): at android.view.Surface.lockCanvas(Surface.java:76)
11-28 10:24:44.488: E/ViewRootImpl(25384): at android.view.ViewRootImpl.draw(ViewRootImpl.java:1924)
11-28 10:24:44.488: E/ViewRootImpl(25384): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1613)
11-28 10:24:44.488: E/ViewRootImpl(25384): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2418)
11-28 10:24:44.488: E/ViewRootImpl(25384): at android.os.Handler.dispatchMessage(Handler.java:99)
11-28 10:24:44.488: E/ViewRootImpl(25384): at android.os.Looper.loop(Looper.java:137)
11-28 10:24:44.488: E/ViewRootImpl(25384): at android.app.ActivityThread.main(ActivityThread.java:4340)
11-28 10:24:44.488: E/ViewRootImpl(25384): at java.lang.reflect.Method.invokeNative(Native Method)
11-28 10:24:44.488: E/ViewRootImpl(25384): at java.lang.reflect.Method.invoke(Method.java:511)
11-28 10:24:44.488: E/ViewRootImpl(25384): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
11-28 10:24:44.488: E/ViewRootImpl(25384): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
11-28 10:24:44.488: E/ViewRootImpl(25384): at dalvik.system.NativeStart.main(Native Method)
有其他人看到的修复程序的这种行为/知道吗?
这不适用于运行ICS的Samsung Galaxy Tab 2。 :( –