I am developing and testing a simple video player example in Android. Code is given below:
VideoView vid = (VideoView) findViewById(R.id.videoView1);
vid.setVideoPath("/sdcard/myvideo.mp4");
vid.setMediaController(new MediaController(this));
vid.start();
vid.requestFocus();
I am using HTC ONE V. When I run this on my phone I am getting a NullPointerException
on the line where I set the path of video (i.e. setVideoPath("/sdcard/myvideo.mp4")
). I think there is problem in accessing the memory card.
So can anyone kindly tell that is the way to access memory card on HTC ONE V different from other phones? And if yes then how to access the memory card HTC ONE V.