[java]
package cn.c;
import java.io.File;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
import android.widget.Button;
public class MainActivity extends Activity {
private Button mButton;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mButton=(Button) findViewById(R.id.button);
mButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent=new Intent(android.content.Intent.ACTION_VIEW);
Uri data=Uri.parse
(Environment.getExternalStorageDirectory().getPath()+File.separator+"Test_Movie.m4v");
intent.setDataAndType(data, "video/mp4");
startActivity(intent);
}
});
}
}