at3s 4 Posted February 11, 2021 Actually problem becomes in Android 10, in Android 6 I have so fine. I just have developed a form which shows folders and files in TPath.GetSharedPicturesPath directory. I have ask to grant READ_EXTERNAL_STORAGE permission for application, it is properly granted, checked in system. But TDirectory.GetDirectories(TPath.GetSharedPicturesPath, '*') returns an empty list of folders as well as TDirectory.GetFiles(TPath.GetSharedPicturesPath) returns an empty list of files in Android 10. Even I get a level up folder. Any idea? Share this post Link to post
Guest Posted February 11, 2021 option "Secure File Sharing" is checked? http://blong.com/Articles/AndroidPermissions/DelphiAppPermissions.htm http://docwiki.appmethod.com/appmethod/1.13/topics/en/Uses_Permissions hug Share this post Link to post
at3s 4 Posted February 11, 2021 9 minutes ago, emailx45 said: option "Secure File Sharing" is checked? http://blong.com/Articles/AndroidPermissions/DelphiAppPermissions.htm http://docwiki.appmethod.com/appmethod/1.13/topics/en/Uses_Permissions hug Yes, it's checked. TDirectory.GetDirectories anyway returns an empty list for /storage/emulated/0/ Share this post Link to post
Guest Posted February 11, 2021 (edited) /0 would be a "root" on mobile devices you cannot access it you need a folder access, like "Downloads", "Pictures", etc now if you are using RAD10.4.x can be one of many bugs from this edition! hug Edited February 11, 2021 by Guest Share this post Link to post
at3s 4 Posted February 11, 2021 2 minutes ago, emailx45 said: /0 would be a "root" on mobile devices you cannot access it you need a folder access, like "Downloads", "Pictures", etc hug It makes sense. But TPath.GetSharedPicturesPath returns /storage/emulated/0/Pictures/ I need to be able to show pictures from device in my form. Share this post Link to post
Guest Posted February 11, 2021 (edited) please follow the links above. search in my profile my post about use of PERMISSIONS on Android. with sources tested. hug Edited February 11, 2021 by Guest Share this post Link to post
at3s 4 Posted February 11, 2021 10 minutes ago, emailx45 said: please follow the links above. search in my profile my post about use of PERMISSIONS on Android. with sources tested. hug Based on topic "Runtime permissions in Android (new in Delphi 10.3)", do you think I have to grant ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION permissions as well? Otherwise I do not see any differnces I already define in an application. Share this post Link to post
at3s 4 Posted February 11, 2021 Here is solution: [RSP-30935] Android 10 delphi 10.4 camera and gallery doesn't work - Embarcadero Technologies When I added android:requestLegacyExternalStorage="true" into 'AndroidManifest.template.xml', application started to be working so fine in Android 10. Now I'm interesting what shall be in Android 11... Share this post Link to post
Guest Posted February 11, 2021 for that always detail your programming setup! then, the answer can go quickly. hug Share this post Link to post
at3s 4 Posted February 12, 2021 8 hours ago, emailx45 said: for that always detail your programming setup! then, the answer can go quickly. hug I'm agree with you. But I have not any special in my project setup settings. Any newly created FMX project shall have mostly the same AndroidManifest.template.xml file. So the topic's issue shall be there as well. Share this post Link to post
weabow 6 Posted March 1, 2021 I solved this kind of problem by removing ARM fichier de map in linker configuration, in Options/Construction/Compiler/Linker (see attached picture). Share this post Link to post
tiagoom 0 Posted May 2, 2023 I have the same problem, but now with Android 12. I give the permissions, I can save in TPath.GetSharedPicturesPath but I can't read them. Share this post Link to post