After my last app update, targeting SDK 29, I receive some emails by users, with screenshots showing that no directories and/or files are shown while opening fileDialog with path set to dirRootExternal. These users insist that there was no problem in the previous app version.
Unfortunately I cannot replicate this, and to be honest, I'm not even sure that changing the target SDK made a difference, since on my personal phone with android 11, and others with android 10 and 9, there is no problem at all.
Here's my code, first I get permissions:
And then opening the fileDialog:
Wonder if anyone else noted such behavior and if there's a straight forward solution to this which I missed reading about.
(Note: I am aware of the contentChooser lib, still I'm not quite sure if I can really set the filter to my app's file extension format, but in the end if I have to use this, I will open another thread with my specific question.)
Unfortunately I cannot replicate this, and to be honest, I'm not even sure that changing the target SDK made a difference, since on my personal phone with android 11, and others with android 10 and 9, there is no problem at all.
Here's my code, first I get permissions:
B4X:
rp.CheckAndRequest(rp.PERMISSION_READ_EXTERNAL_STORAGE)
wait for activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
openFileBrowser
end if
And then opening the fileDialog:
B4X:
Private sd As FileDialog
sd.FilePath=File.DirRootExternal
sd.TextColor=Colors.Black
sd.FileFilter=".myFileExtension"
Private sf As Object=sd.ShowAsync("Choose file","OK","Cancel","",Null,False)
wait for (sf) dialog_result (rt As Int)
If rt=DialogResponse.POSITIVE Then
end if
Wonder if anyone else noted such behavior and if there's a straight forward solution to this which I missed reading about.
(Note: I am aware of the contentChooser lib, still I'm not quite sure if I can really set the filter to my app's file extension format, but in the end if I have to use this, I will open another thread with my specific question.)