标签:android blog io ar java on 文件 2014 art
1. 采用Intent调用外部播放器进行视频播放
Intent intent = new Intent(Intent.ACTION_VIEW); String type = "video/mp4"; Uri uri = Uri.parse("/sdcard/123.mp4"); intent.setDataAndType(uri, type); startActivity(intent);
VideoView videoView; videoView = (VideoView)this.findViewById(R.id.videoView); String uri = "android.resource://" + getPackageName() + "/" + R.raw.videoname; videoView.setVideoURI(Uri.parse(uri)); videoView.start();
标签:android blog io ar java on 文件 2014 art
原文地址:http://blog.csdn.net/tanmengwen/article/details/41914969