How to access Music folder in Windows Phone 8.1?
-
wrote on 29 Jun 2015, 17:39 last edited by
I'm trying find out the way to access music folder in windows phone 8.1 then read file by QFile, and after some days searching on the web but still no answer. Anyone did this?
Thanks! -
Hi and welcome to devnet,
I don't have a Windows Phone to verify but are you using QStandardPaths with MusicLocation for that ?
-
Hi and welcome to devnet,
I don't have a Windows Phone to verify but are you using QStandardPaths with MusicLocation for that ?
wrote on 30 Jun 2015, 13:56 last edited by@SGaist yes, I have tried it as below:
QStringList musicPaths = QStandardPaths::standardLocations(QStandardPaths::MusicLocation);
QMessageBox::information( 0, "info", musicPaths.first(), QMessageBox::Ok);
but show empty path, I think QStandardPaths does not work on WP8.1 (audio too)
I'm thinking about write one Windows Runtime Component in c++ and use with Qt, but I don't know how to deploy my dll along with Qt to target. I have import mydll.lib in .pro file but it still not work (dll was not found when run target). -
You have the deployment guide here that should help you
-
wrote on 10 Dec 2015, 08:20 last edited by
You also need to set a capability to have access to the Music library.
Even after that, there might be some additional issues depending on what you want to achieve. You can check the bugtracker for items about this topic.
-
wrote on 14 Dec 2015, 08:11 last edited by
I have not used Qt on WinRT for a while but as far as I remember direct access (without using a file picker) will not work due to sandboxing. WinRT uses StorageFile objects (instead of FILE stuff known from C) and Qt caches these StorageFile handlers internally but only after using a picker.