【问题标题】:How to play a video from URL in Action View in android如何在 Android 的 Action View 中从 URL 播放视频
【发布时间】:2013-08-04 14:49:21
【问题描述】:

我正在开发一个应用程序,在该应用程序中,我想从从 WEB SERVER 接收的 URL 播放视频意图动作视图,我得到了不支持的文件格式。我的代码是

Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
            videostring = ib.getVideostring();
            Uri data = Uri.parse("file:///https://" + videostring.get(0));
            intent.setDataAndType(data, "video/*");
            context.startActivity(intent);

【问题讨论】:

标签: android actionview


【解决方案1】:

更改Uri data = Uri.parse("file:///https://" + videostring.get(0));

Uri data = Uri.parse("https://" + videostring.get(0));

【讨论】:

    猜你喜欢
    • 2015-03-09
    • 2013-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多