Android Question Latest Android Storage Woes

canalrun

Well-Known Member
Licensed User
Longtime User
I have an app, for personal use only not for Google Play, that displays a text file.

It works fine compiled using B4A 7.30 with minSdkVersion=5 targetSdkVersion=14 on my Samsung Galaxy A53 (Android 13. On installation it gives me all sorts of warnings about using older software. I just say allow). It also works on my Samsung Galaxy Flip3 (also Android 13. Also ignore the warnings), but the screen shows a 1 inch gap at the top and bottom.

I read the text file from a file in the /sdcard/Download folder (this is where it ends up when downloaded from Google Drive).

It compiles using the newer B4A, version 12.30, minSdkVersion=14 targetSdkVersion=31. On my Flip 3 it runs and there are now no screen gaps, but I can no longer see the file in the /sdcard/Download folder. I am using the file dialog from Dialogs2.

My guess is this has something to do with the new "Scoped Storage". I tried SetApplicationAttribute (android:requestLegacyExternalStorage, true) in the manifest, but that didn't help. I've tried implementing it with chooser, but that adds a lot of complexity, it also allowed me to see the file on Google Drive by not select it.

Is there a really simple solution? If need be I can live with the gaps, but it would be nice to bring myself up to date with the newer B4A.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…