Delpher2600 0 Posted May 12 Hello. I'm using this code: TDirectory.CreateDirectory('/storage/emulated/0/NewFolder'); for creating new folder. And it's worked every time. But now i installed Delphi 11 CE and this code not working - new folder just not appering in the list of catalogs. What is it and how fix it? Share this post Link to post
Dave Nottage 557 Posted May 12 The target API level for Delphi 11.3 defaults to 32, which is Android 12. Since Android 10, access to shared folders has been restricted. You'll need to either manually modify AndroidManifest.template.xml to change %targetSdkVersion% to 29 (Android 10) and ensure that the android:requestLegacyExternalStorage=true attribute is present on the application opening tag, or rethink how you're accessing files, e.g. whether they need to be in a shared area at all, and if so, whether to use MediaStore or DocumentsProvider. You may want to read this. Share this post Link to post
Delpher2600 0 Posted May 12 29 minutes ago, Dave Nottage said: You'll need to either manually modify AndroidManifest.template.xml to change %targetSdkVersion% to 29 (Android 10) and ensure that the android:requestLegacyExternalStorage=true attribute is present on the application opening tag O'K, how make it? 30 minutes ago, Dave Nottage said: or rethink how you're accessing files, e.g. whether they need to be in a shared area at all, and if so, whether to use MediaStore or DocumentsProvider. Well, i need getting access to shared folders for my app work. And how make it? Isn't it shared folder not must to be available to all? Share this post Link to post
Delpher2600 0 Posted May 12 (edited) P.S. Now i checked - i can make a folders on the way: '/storage/emulated/0/Android/NewFolder', but i can't save a files there! Edited May 12 by Delpher2600 Share this post Link to post