[Interest] Is there a full FileDialog example for Android with writing and saving files?

Nuno Santos nuno.santos at imaginando.pt
Fri Oct 18 12:56:13 CEST 2024


Hi,

Qt 6.8 introduces the support for FileDialog on Android

The problem is that simply using it is not enough. When using the FileDialog to save a file, it saves as a zero byte file:

W DRC     : java.lang.SecurityException: Permission Denial: reading com.android.externalstorage.ExternalStorageProvider uri content://com.android.externalstorage.documents/document/primary%3ADownload%2Fbankdrc.dbf from pid=15086, uid=10502 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs

There is a lot of boiler plate to handle the permissions to write to the system. 

Is there any example where this boiler plate code can be found?

Thanks in advance!

Regards,

Nuno


More information about the Interest mailing list