视频无法在摩托罗拉2.3.3中使用SD卡播放

时间:2013-05-07 09:37:06

标签: android video mediacontroller

我正在开发一个应用程序,因为我需要从SD卡播放视频。我使用以下代码,并在除motorola 2.3.3设备之外的所有设备中正常工作。

有时候它会播放10-15秒的视频,然后是黑屏,但有时候只显示黑屏,它会在视频底部显示持续时间。

所以,请指导我.. thankyou

VideoView vv = (VideoView) this.findViewById(R.id.video_view);
String filepath = "mnt/sdcard/my_video.mp4";
MediaController mc = new MediaController(this);
mc.setAnchorView(vv);
vv.setMediaController(mc);
vv.requestFocus();
vv.start();

1 个答案:

答案 0 :(得分:0)

if(play the same video using default player in gallery){

      //you are doing something wrong in ur code    

}else{

//this device has no capabilities to play the provided video with the default codes.
//try to look for any installed app that can play the video for this devices

}