This is My code but when I start the mediaplayer it have only the sound come out and the surface have nothing shown . Why?
I have no idea on this. Do you have some code help me to learn with this.
videoV = (SurfaceView) findViewById(R.id.SurfaceView1);
sh = videoV.getHolder();
File path = Environment.getExternalStorageDirectory();
File file = new File(path, "sample2.mp4");
sh.addCallback(this);
mp = new MediaPlayer();
mp.setDataSource(file.getAbsolutePath());
mp.setDisplay(sh);
mp.prepare();
mp.start();