Android调用系统播放器
Java代码package cn.com;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle; www.zzzyk.com
public class Video extends Activity {
Stringpath = "file:///sdcard/tmp60115.mp4";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent it = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse(path);
it.setDataAndType(uri , "video/mp4");
startActivity(it);
}
}
摘自 sql_help的专栏
补充:移动开发 , Android ,