简体   繁体   English

MIT App Inventor访问通过OTG连接的USB驱动器文件的路径是什么?

[英]What is the path for MIT App Inventor to access a USB drive files connected via OTG?

I have a thumb drive with videos on it and it is connected to my Android using a USB OTG cable. 我有一个带有视频的拇指驱动器,它使用USB OTG电缆连接到我的Android。 The File Manager app on my phone sees the USB storage device and I can click into it and see the folders and videos I need, but I cant figure out the correct path to load them from the USB device in app inventor. 手机上的“文件管理器”应用程序可以看到USB存储设备,我可以单击它并查看所需的文件夹和视频,但是我无法找出从app inventor中从USB设备加载它们的正确路径。

I have tried this: file:///storage/usbdisk/MyCamera/RecentClips/front.mp4 我已经尝试过: file:///storage/usbdisk/MyCamera/RecentClips/front.mp4

when the file is in a folder on the USB drive like this: d:/MyCamera/RecentClips/front.mp4 当文件位于USB驱动器上的文件夹中时,如下所示: d:/MyCamera/RecentClips/front.mp4

but I get an error: 但我得到一个错误:

Error 107: unable to load 错误107:无法加载

How do I access files on a USB drive in MIT App Inventor? 如何在MIT App Inventor中访问USB驱动器上的文件?

I don't know, if it is possible to access the files, but you could try the file extension and its AvailableStorageDirectories method to find out the path 我不知道是否可以访问文件,但是您可以尝试使用文件扩展名及其AvailableStorageDirectories方法来查找路径

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM