I am trying to play video in Android. My widget is Kindle Fire so Android version is 2.3.4. Here is my code:
super.onCreate(savedInstanceState);
setContentView(R.layout.video);
Uri uri = Uri.parse(getIntent().getExtras().getString(VIDEO_URI));
MediaController mediaController = new MediaController(this);
VideoView videoView = (VideoView) findViewById(R.id.videoView);
videoView.setMediaController(mediaController);
videoView.setVideoURI(uri);
videoView.requestFocus();
videoView.start();
It shows dialog box with title
"Cannot play video"
and message
"An error occured while trying to play your video. The video may have been interrupted or is an unsupported format. Please try again."