我从SD卡获取所有视频的列表,然后点击列表播放视频,但视频显示"无法播放此视频错误"
我的代码:
Intent i = getIntent();
Bundle extras = i.getExtras();
filename = extras.getInt("position");
checkPermissions();
videoView=(VideoView)findViewById(R.id.videoview);
videoView.setVideoPath(String.valueOf(filename));
videoView.setMediaController(new MediaController(this));
videoView.requestFocus();
videoView.start();