我想在我存储在 sd 卡中的 android 模拟器上播放视频文件。这是我的代码..
public class AndroidVideoViewActivity extends Activity {
private VideoView videoView=null;
private String PATH="mnt/sdcard/bmxskills.3gp";
private MediaPlayer mediaPlayer=null;
private MediaController mediaController=null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
VideoView videoView=(VideoView)findViewById(R.id.videoView);
videoView.setVideoPath("mnt/sdcard/bmxskills.3gp");
videoView.setMediaController(mediaController);
videoView.requestFocus();
videoView.start();
}
}
但是当我在模拟器上运行时它显示空白屏幕。请帮助。我添加了所需的权限,即互联网和外部存储。