I need to read an excel spreadsheet and create a sql database. I have achieved it before but I am porting the app to a new tablet with a newer android version and cannot find where I can locate the external file or what code changes are needed. Listing the file locations gives me:
DirDefaultExternal = /storage/emulated/0/Android/data/b4a.konnqa3/files
DirInternal = /data/user/0/b4a.konnqa3/files
DirRootExternal = /storage/emulated/0
I cannot find any of these locations on the tablet? Are there restrictions on accessing external files with the newer versions of Android.
I need to read an excel spreadsheet and create a sql database. I have achieved it before but I am porting the app to a new tablet with a newer android version and cannot find where I can locate the external file or what code changes are needed. Listing the file locations gives me:
DirDefaultExternal = /storage/emulated/0/Android/data/b4a.konnqa3/files
DirInternal = /data/user/0/b4a.konnqa3/files
DirRootExternal = /storage/emulated/0
I cannot find any of these locations on the tablet? Are there restrictions on accessing external files with the newer versions of Android.
It's not possible anymore since Android 11.
You need to connect your device with the USB cable to the computer and then you will be able to open a device as a network drive.
Still trying to access external files. Trying to compile the ManageExternalStorage example but it is complaining about an unknown member ShowAsync as per the line below.
Dim fda As Object = fd.ShowAsync("B4A File Dialog", "OK", "Cancel", "", Bmp, False)
I believe this is something to do with Dialog2 library which I cannot find? Can someone point me in the right direction please.
Still trying to access external files. Trying to compile the ManageExternalStorage example but it is complaining about an unknown member ShowAsync as per the line below.
Dim fda As Object = fd.ShowAsync("B4A File Dialog", "OK", "Cancel", "", Bmp, False)
I believe this is something to do with Dialog2 library which I cannot find? Can someone point me in the right direction please.
Finally managed to get it to work and list the folders which I can dig down into. However it is not showing me any actual files to select, just folders are listed. Is there anything extra I need to do. I ran the ManageExternalStorage and that works perfectly. If it helps my code is:
Dim fdFile As FileDialog
fdFile.FilePath = File.DirRootExternal
fdFile.FileFilter = ".xls"
Dim fda As Object
fda = fdFile.ShowAsync("Select spreadsheet file to load", "Load", "Cancel", "", Null, False)
Wait For (fda) dialog_result(result As Int)
Finally managed to get it to work and list the folders which I can dig down into. However it is not showing me any actual files to select, just folders are listed. Is there anything extra I need to do. I ran the ManageExternalStorage and that works perfectly. If it helps my code is:
Dim fdFile As FileDialog
fdFile.FilePath = File.DirRootExternal
fdFile.FileFilter = ".xls"
Dim fda As Object
fda = fdFile.ShowAsync("Select spreadsheet file to load", "Load", "Cancel", "", Null, False)
Wait For (fda) dialog_result(result As Int)
Hi all I created a small project to play with the Document Picker - it allows user to select a pdf that is already on his phone and then it copy this file into the app document folder so I can later send it to my server. So far ot works. As an example I used this project TextEditor. My...