Display video with VideoView
package app.test; import android.app.Activity; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.widget.VideoView; public class Test extends Activity { VideoView vv; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); vv = (VideoView) this.findViewById(R.id.VideoView); Uri videoUri = Uri.parse(Environment.getExternalStorageDirectory().getPath()+ "/Test.m4v"); // Uri videoUri = Uri.parse(Environment.getExternalStorageDirectory().getPath() + "/Test.m4v"); vv.setVideoURI(videoUri); vv.start(); } } //main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <VideoView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/VideoView"></VideoView> </LinearLayout>