[英]how can i play videos on android if they are stored in a FOLDER in the sdcard1?
getExternalStorageDirectory()返回sdcard0的路徑。 但是通常,視頻和音頻存儲在sdcard1中,也存儲在文件夾中。 我如何獲得這些文件夾的路徑?
您可以嘗試像這樣設置路徑:
...("/sdcard1/folder/file");
嘗試這個,
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();
}
我希望這能解決您的問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.