I have two questions. I create movie player.
This is my code:
VideoView videoView = (VideoView)this.findViewById(R.id.videoView);
MediaController mc = new MediaController(this);
videoView.setMediaController(mc);
videoView.setVideoPath("/sdcard/747.3gp");
videoView.requestFocus();
videoView.start();
As you can see I want to play movies from sd card. To check my results I use emulator 2.2. So this is my first question: always when I want to play movie, he is stuck, but sound from movie is playing correctly. This is emulator error or maybe I am doing something wrong? And second question. I want play movies this way. I execute application and I get List of movies. I choose movie and this movie is playing. How I can do this? Can you write me example? I need help 🙂
For your first question, this should definitely be emulator’s speed problem or problem with your file itself.
And answering your second question, you can go for samples like file explorer which displays all the files from sdcard in a listview and using which you can handle to show only video files.
Here is a example of file explorer,
http://android-er.blogspot.com/2010/01/implement-simple-file-explorer-in.html
http://androidsamples.blogspot.com/2009/06/displaying-list-of-video-files-stored.html
Extract the necessary code from the links and modify it accordingly.