[Interest] Qt Android - Targeting API 29 (Android 10): How to write to a non scoped location that is visible to the user via generic Files app?
Alexander Dyagilev
alervdvcw at gmail.com
Wed May 25 02:36:55 CEST 2022
Hello,
These are the private folders of your application. As far as I know,
QStandardPaths was changed to return them instead of public locations
under Android.
You should use Android APIs to get paths to public locations instead.
On 5/13/2022 2:51 PM, Nuno Santos wrote:
> Hi,
>
> I’m having an hard time figuring out how to write files from a Qt
> Android app, to a location that is public to the user, outside of the
> scoped storage.
>
> I’m currently using Qt 5.15.9 and targeting API 29 (Android 10). I
> have set in my manifest requestLegacyExternalStorage=true
>
> And then I have tried to write a dummy file to the following
> StandardLocations:
>
> DesktopLocation - "/data/user/0/com.acme.org
> <http://com.acme.org>/files/test_file.txt"
> DocumentsLocation - "/storage/emulated/0/Android/data/com.acme.org
> <http://com.acme.org>/files/Documents/test_file.txt"
> MusicLocation - "/storage/emulated/0/Android/data/com.acme.org
> <http://com.acme.org>/files/Music/test_file.txt"
> PicturesLocation - "/storage/emulated/0/Android/data/com.acme.org
> <http://com.acme.org>/files/Pictures/test_file.txt"
> HomeLocation - "/data/user/0/com.acme.org
> <http://com.acme.org>/files/test_file.txt"
> GenericDataLocation - "/storage/emulated/0/Android/data/com.acme.org
> <http://com.acme.org>/files/test_file.txt"
> DownloadLocation - "/storage/emulated/0/Android/data/com.acme.org
> <http://com.acme.org>/files/Download/test_file.txt"
> GenericCacheLocation - "/data/user/0/com.acme.org
> <http://com.acme.org>/cache/test_file.txt”
>
> Then, with the files app I try to find any of the files without
> success… :(
>
> How do we write to public files to public locations, outside the
> scoped storage? Is it currently possible?
>
> Thanks in advance!
>
> Nuno
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220525/ea050fb2/attachment.htm>
More information about the Interest
mailing list