Solved Usb device
-
Hi!
I want to get a file from usb device.
I did everything as on this site https://developer.android.com/guide/topics/connectivity/usb/host.html
I get the path to the device like qstr = "/dev/bus/usb/001/030". In Qt QFile(qstr).exists() return true.
But I can not get files from device:QDirIterator it(qstr, QStringList() << "*.mp4", QDir::Files, QDirIterator::Subdirectories); while (it.hasNext()) qDebug() << it.next();
What could be the reason?
-
I solved my problem with android tools. I connected my usb to android and chose "connect as internal storage". My device was formatted. After in the settings I changed to external storage. Appeared my device in /storage/MyUSBNAME.
-
Without error message this is crystal ball reading.
Checkout QFile's functions about status of file.
-
I solved my problem with android tools. I connected my usb to android and chose "connect as internal storage". My device was formatted. After in the settings I changed to external storage. Appeared my device in /storage/MyUSBNAME.