[英]how can i play videos on android if they are stored in a FOLDER in the sdcard1?
the getExternalStorageDirectory() returns the path to sdcard0. getExternalStorageDirectory()返回sdcard0的路径。 But generally videos and audios are stored in the sdcard1, that too in folders.
但是通常,视频和音频存储在sdcard1中,也存储在文件夹中。 How can i get the path to these folders ?
我如何获得这些文件夹的路径?
您可以尝试像这样设置路径:
...("/sdcard1/folder/file");
Try this, 尝试这个,
Make videoView,
VideoView videoView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
videoView = (VideoView)findViewById(R.id.VideoView);
videoView.setVideoPath("/sdcard1/blonde_secretary.3gp");
videoView.start();
}
I hope this will solve your problem. 我希望这能解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.