I\'ve been really banging my head against the table trying to get the MediaPlayer class to try to play h.264-encoded videos on Android 2.1. My code is rather simple:
To playback a video or audio file located in the raw folder use:
mMediaPlayer = MediaPlayer.create(this, R.raw.a_video_or_audio_file); mMediaPlayer.start();
no need to call prepare() when using MediaPlayer.create(Context,R.raw.some_resource_file)