Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/232.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 显示VideoView的手机存储位置_Android - Fatal编程技术网

Android 显示VideoView的手机存储位置

Android 显示VideoView的手机存储位置,android,Android,如何在android中显示手机存储中的视频位置?我从sd卡显示,但我尝试从手机存储器显示视频。我在图库中尝试的视频位置 vView.setVideoPath("/Gallery/test30fps.mp4"); 但它不起作用 //get the VideoView from the layout file vView = (VideoView)findViewById(R.id.vview); //use this to get touch events vV

如何在android中显示手机存储中的视频位置?我从sd卡显示,但我尝试从手机存储器显示视频。我在图库中尝试的视频位置

vView.setVideoPath("/Gallery/test30fps.mp4");
但它不起作用

    //get the VideoView from the layout file
    vView = (VideoView)findViewById(R.id.vview);

    //use this to get touch events
    vView.requestFocus();

    //load video from SD card
    vView.setVideoPath("/sdcard/test30fps.mp4");

    //enable this if you want to enable video controllers, such as pause and forward
    vView.setMediaController(new MediaController(this));

    //plays the movie
    vView.start();

试试这个,下载后写下你的视频名称
vView.setVideoPath(“/mnt/sdcard/Download/sound of birds SD.mp4”)

你说“不工作”是什么意思?请出示日志