Android Question ExternalStorage.SelectDir never sends ExternalFolderAvailable, terminates program

DougT

New Member
Licensed User
Longtime User
I am trying to access the external microSD card on my Samsung S8+ tablet running Android 12. When I use this code:

Private Sub pb_TestIt_Click
Storage.SelectDir(True)
Wait For Storage_ExternalFolderAvailable
TestIt2
End Sub


I get the directory chooser window, can choose a directory and then click Allow in the permissions dialog which closes the chooser window. But then I return to the home screen and not my application. A breakpoint on the "TestIt2" sub is never reached.

Yet when I compile and run the example application, it works perfectly on the same tablet and OS. I have made sure the Module Attributes and Manifests are identical in both programs. Both programs dim the object in Process_Globals and initialize it successfully in Activity_Create.

What am I missing? (Thanks in advance for your help!)

Doug Tittle
 

DougT

New Member
Licensed User
Longtime User
Erel - thanks for moving me to the right forum and the format suggestions.

agraham - there was a missing class problem noted in the logs. (Most of my errors are programming sequence errors, so I forgot about the log!)

Then, I noticed I had forgotten to add:
B4X:
#AdditionalJar: androidx.legacy:legacy-support-core-utils

Once I did this, my little test program worked fine, but the original program I was trying to update still did not. It must be something resulting from creating the test program in B4A ver 11 and the original program (for Android 4) in B4A from long ago (but still compiled using ver 11). So, I am cutting and pasting code from the old project into the new one and converting it to use ExternalStorage.

Thanks!

DougT
 
Upvote 0
Top