hi guys i have prepared a code to just play a simple mp4 file from my res folder... The coding is something like this...
public class VideoPlayer extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.video);
VideoView video = (VideoView)findViewById(R.id.VideoView);
Uri uri = Uri.parse("android.resource://company.software.myapp/"
+ R.raw.myvideo);
MediaController mc = new MediaController(this);
video.setMediaController(mc);
video.setVideoURI(uri);
//video.requestFocus();
video.start();
}
}
now though there is no error in playing... The activity automatically generates a dialog saying "sorry this video cannot be played"... but i can hear the Audio and it plays till end... i cant figure out wat the problem is...