无法在android videoview中播放.3gp视频
您好,我下载并播放了下面提到的3gp视频使用Android视频播放器,但我找不到一种方式来播放它使用下面的代码。 我的xml布局定义如下:无法在android videoview中播放.3gp视频,android,android-videoview,3gp,Android,Android Videoview,3gp,您好,我下载并播放了下面提到的3gp视频使用Android视频播放器,但我找不到一种方式来播放它使用下面的代码。 我的xml布局定义如下: <VideoView android:id="@+id/before_begin_video" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center" an
<VideoView
android:id="@+id/before_begin_video"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_centerInParent="true"
android:layout_below="@id/before_begin_title" />
此代码显示手机上的媒体播放器:
Uri video = Uri.parse("https://dl.dropbox.com/s/xxxx/videoname.3gp?dl=0?client_id=xxxxxxx");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setType("video/*");
Intent intent0 = Intent.createChooser(intent, "Complete Action Using");
startActivity(intent0);
但是当我添加intent.setData(视频)时,文件选择器会显示chrome和其他WebBrowser,但没有像上面那样的视频播放器
Uri video = Uri.parse("https://dl.dropbox.com/s/xxxx/videoname.3gp?dl=0?client_id=xxxxxxx");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setType("video/*");
intent.setData(video);
Intent intent0 = Intent.createChooser(intent, "Complete Action Using");
startActivity(intent0);
终于找到了解决这个问题的方法: 之前:我将.avi转换为.3gp-.3gp不能在HTC Sensation 4g上运行 之后:将.avi转换为.mp4-完全有效
Uri video = Uri.parse("https://dl.dropbox.com/s/xxxx/videoname.3gp?dl=0?client_id=xxxxxxx");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setType("video/*");
intent.setData(video);
Intent intent0 = Intent.createChooser(intent, "Complete Action Using");
startActivity(intent0);