2 Answers
2

The problem might be with the video encoding. Android FROYO and Gingerbread doesn't support H264 formats other than "Baseline" H264. So if your video is Mp4 & H264 encoded make sure its "AVC baseline" encoded. Use some tools like "Media info" in windows/Linux and check your video encoding. Convert the video to Baseline if possible.

An alternative workaround is to skip the Videoview and use a video play intent and redirect the playback to an app. User will be prompted to pick a player to handle the playback. Obviously if the video view cant play the file, the default player also wont be able to handle the file. you can choose some other installed player like Mx-Player which will stream the file perfectly.

The problem why the videos does not played was the phone does not have the supporting video codecs.
This is because the video is recorded in some device with specific codec(mpeg4), but that recorded video cannot be played in other devices that does not have that mpeg4 codec.
So to overcome this we need to install the missing codec on to the phone. This can be done by

1) Install MX video Player from the Google Play Store

2) This MX Player itself ask the user to install the codec that the phone needs.