使用Java访问mtp设备 [英] access mtp device with java
问题描述
我开发了一个小型应用程序,可以将文件从一个文件夹复制到另一个文件夹.我使用JFileChooser选择目标目录.我很久没有尝试的事情是选择手机作为目标目录.但我无法从我的JFileChooser中找到它.我还读了其他一些问题,我想知道是否可以将文件从PC复制到mtp设备? 我的目标是linux和Windows平台.
I have developed a small application that copies files from a folder to another.I use a JFileChooser to select the target directory.Something I hadn't tried for a long time is to select my phone as the target directory.I tried but I couldn't find it from my JFileChooser. I read some other so questions and I was wondering if there is that will allow me to copy files from my pc to an mtp device? I am targeting linux and windows platforms.
我的手机是LG Nexus 5 Android 6.0.1. 谢谢你的时间. 如果您想投票,我想知道原因
My phone is LG Nexus 5 android 6.0.1. Thanks for your time. If you want to downvote I would like to know the reason
推荐答案
在现代Android版本中,USB海量存储已被禁用.您可以尝试启用USB调试(在开发人员选项"中),然后查看是否有帮助.我已经在装有LG G3 Android 5.0的Windows 10上成功尝试过
In modern Android releases, USB Mass Storage has been disabled. You can try to enable USB Debugging (in Developer Options) and see if it helps. I've tried it successfully on Windows 10 with a LG G3 Android 5.0
这篇关于使用Java访问mtp设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!