Cant open file from file dialog in qt android
-
I am trying to open a kml file from file dialog in qt qml for android app. I am using Qt 5.14.1, SDK version 28 and ndk version 21. I get a URL from file dialog like this :
content://com.android.externalstorage.documents/document/primary%3AKML%2Fmykml1.kml
How can I convert this URL into the file path and open a file using file dialog from qt android.
I also have issue related to folder creation. I create a folder at following location.
QDir homePath(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation));
The folder get created at given location but I am not able to see the folder. How can I see that folder?
-
@HemantSuryawanshi
In android, you should useQStandardPaths::AppDataLocation
, this is my setting, it works well on Qt5.14.1m_currentDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
-
I already used
QStandardPaths::AppDataLocation
but it gives me same result. Not able to see folder at that location. Does it require any spacial permissions? I already give READ_EXTERNAL_STORAGE & WRITE EXTERNAL_STORAGE permissions.