Android - Open file with QFile
After recording a video with the Camera on an Android device, the actualLocation is file:///storage/emulated/0/DCIM/VID_00000012.3gp
How can I open it?
Code:
videoLocation.setFileName(actualLocation);
if (videoLocation.
open(QIODevice::ReadOnly)) { ...
}
else {
qDebug() << videoLocation.errorString();
}
The open method fails an the errorString prints No such file or directory
Re: Android - Open file with QFile
actualLocation is a file URI, not a file name, QFile works on file names.
QUrl::toLocalFile().
Cheers,
_