3

i am developing an application in that i need to play video from sd card. i am using the following code and its working fine in all devices except motorola 2.3.3 device.

some times its playing 10-15 seconds video then black screen came , but some times it shows only black screen and it shows time duration in the bottom of the video view.

so, please guide me.. 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();
koti
  • 1,071
  • 3
  • 15
  • 35

1 Answers1

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

}
Avadhani Y
  • 7,566
  • 19
  • 63
  • 90
oops.objective
  • 1,264
  • 1
  • 8
  • 8