有什么办法从桌面访问android手机的sd卡文件?我写了一个应用程序,在/ mnt/sdcard /中有一个名为video.mp4的文件。当活动启动时,我启动了一个nanohttp服务器(http),该工作目录是/ mnt/sdcard。那么为什么我不能从vlc播放器访问'protocol://x.x.x.x:port/video.mp4'?我成功地在apache web服务器中检查了这个。我的应用程序对外部存储具有读/写权限。使用nanohttpd直接从android sd卡访问文件
private class MyHTTPD extends NanoHTTPD {
public MyHTTPD() throws IOException {
super(PORT, Environment.getExternalStorageDirectory());
}
.......
.......
}
您是否有任何证据表明VLC与NanoHTTTP在任何地方都兼容,更不用说Android了? – CommonsWare 2013-02-24 16:39:05
你可以检查我的答案在这里http://stackoverflow.com/questions/17102954/why-images-and-style-files-couldnt-found-on-nanohttpd/17103609?noredirect=1#comment24743838_17103609与此解决方案我能从SD卡 – MP23 2013-06-14 08:23:57