Android Question How to get a result of 'Wait For Storage_ExternalFolderAvailable' ?

palmzac

Active Member
Licensed User
Longtime User
Hi,

There is a problem that I can't get a user respone from 'Wait For Storage_ExternalFolderAvailable' routine.

I don't known if user was pressed 'BACK' key on this routine. I don't known if user does not choose any folder. I want to known that user choose a folder or not.

How to do that ? Thank for you help !

B4X:
Sub btnPickFolder_Click
    Storage.SelectDir(chkUsePreviouslySelected.Checked)
    Wait For Storage_ExternalFolderAvailable   
    FoldersStack.Clear
    EnterFolder(Storage.Root)
End Sub
 

agraham

Expert
Licensed User
Longtime User
There is a public Root class global in the ExternalStorage class that stores the information of the root folder for the external storage access when you call SelectDir. You could try checking that its IsFolder field is True or that the Name field is what you expect.
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
Hi,

There is a problem that I can't get a user respone from 'Wait For Storage_ExternalFolderAvailable' routine.

I don't known if user was pressed 'BACK' key on this routine. I don't known if user does not choose any folder. I want to known that user choose a folder or not.

How to do that ? Thank for you help !

B4X:
Sub btnPickFolder_Click
    Storage.SelectDir(chkUsePreviouslySelected.Checked)
    Wait For Storage_ExternalFolderAvailable 
    FoldersStack.Clear
    EnterFolder(Storage.Root)
End Sub

Hi palmzac!

Are you able now to distinguish between "User has selected a folder" and "User pressed back key (without choosing a folder)"? Because I have the same issue here.

Regards
ARTsoft
 
Upvote 0
Top