N noeleon Active Member Licensed User Longtime User Jul 14, 2019 #1 How can I set the initial folder when I launch the folder picker? Code: Copy Dim i As Intent i.Initialize("android.intent.action.OPEN_DOCUMENT_TREE", "") i.putExtra ???????? StartActivityForResult(i) I saw a post on the internet that use the following line but it does not work in B4A putExtra("android.provider.extra.INITIAL_URI", folderUri) Last edited: Jul 14, 2019
How can I set the initial folder when I launch the folder picker? Code: Copy Dim i As Intent i.Initialize("android.intent.action.OPEN_DOCUMENT_TREE", "") i.putExtra ???????? StartActivityForResult(i) I saw a post on the internet that use the following line but it does not work in B4A putExtra("android.provider.extra.INITIAL_URI", folderUri)
Erel B4X founder Staff member Licensed User Longtime User Jul 14, 2019 #2 Please use [code]code here...[/code] tags when posting code. Are you using ExternalStorage: https://www.b4x.com/android/forum/t...access-sd-cards-and-usb-sticks.90238/#content ? Upvote 0
Please use [code]code here...[/code] tags when posting code. Are you using ExternalStorage: https://www.b4x.com/android/forum/t...access-sd-cards-and-usb-sticks.90238/#content ?
N noeleon Active Member Licensed User Longtime User Jul 14, 2019 #3 Are you using ExternalStorage: https://www.b4x.com/android/forum/t...access-sd-cards-and-usb-sticks.90238/#content ? Click to expand... yes I'm using that class Last edited: Jul 15, 2019 Upvote 0
Are you using ExternalStorage: https://www.b4x.com/android/forum/t...access-sd-cards-and-usb-sticks.90238/#content ? Click to expand... yes I'm using that class
Erel B4X founder Staff member Licensed User Longtime User Jul 14, 2019 #4 1. Set UsePreviouslySelectedIfAvaiable to True and the previously selected folder will be selected automatically. 2. noeleon said: I saw a post on the internet that use the following line but it does not work in B4A Click to expand... B4A doesn't do anything with the intent. It is sent to the OS. How did you create folderUri? Upvote 0
1. Set UsePreviouslySelectedIfAvaiable to True and the previously selected folder will be selected automatically. 2. noeleon said: I saw a post on the internet that use the following line but it does not work in B4A Click to expand... B4A doesn't do anything with the intent. It is sent to the OS. How did you create folderUri?
N noeleon Active Member Licensed User Longtime User Jul 15, 2019 #5 How did you create folderUri? Click to expand... It's the persistable uri from the Folder picker. The problem is I also have a File picker using android.intent.action.GET_CONTENT and because they're using the same System UI/Activity the starting folder shown when it's launched is always the one last used. What I wanted was when the File Picker is launched the starting folder is the one where File Picker left off or a pre-set location. The same goes for the Folder Picker. Anyway, I'll just make my own file/folder picker based on your sample project for the ExternalStorage class. I find using the system File Picker problematic if the user picks a file using third party file providers like TotalCMD, ZArchiver, etc., the ones on the side drawer of the file picker. Upvote 0
How did you create folderUri? Click to expand... It's the persistable uri from the Folder picker. The problem is I also have a File picker using android.intent.action.GET_CONTENT and because they're using the same System UI/Activity the starting folder shown when it's launched is always the one last used. What I wanted was when the File Picker is launched the starting folder is the one where File Picker left off or a pre-set location. The same goes for the Folder Picker. Anyway, I'll just make my own file/folder picker based on your sample project for the ExternalStorage class. I find using the system File Picker problematic if the user picks a file using third party file providers like TotalCMD, ZArchiver, etc., the ones on the side drawer of the file picker.