vmag Active Member Nov 14, 2022 #1 Hello, there was a problem with copying from DefaultFolder to DirRootExternal and it was perfectly solved here... SaveAs - Let the user select a target folder + list of other related methods B4A + B4i example: https://www.b4x.com/android/forum/threads/b4x-texteditor-save-and-load-external-files.132731/#post-838166 List of classes or libraries that can be used to access secondary storages: ContentChooser (Phone libray) - allows the user to select a resource or file using external... www.b4x.com but it turns out there is a problem with copying from Dir...External to DefaultFolder I can't solve. Need to copy to DefaultFolder from anywhere Dir External, thanks in advance.
Hello, there was a problem with copying from DefaultFolder to DirRootExternal and it was perfectly solved here... SaveAs - Let the user select a target folder + list of other related methods B4A + B4i example: https://www.b4x.com/android/forum/threads/b4x-texteditor-save-and-load-external-files.132731/#post-838166 List of classes or libraries that can be used to access secondary storages: ContentChooser (Phone libray) - allows the user to select a resource or file using external... www.b4x.com but it turns out there is a problem with copying from Dir...External to DefaultFolder I can't solve. Need to copy to DefaultFolder from anywhere Dir External, thanks in advance.
Erel B4X founder Staff member Licensed User Longtime User Nov 14, 2022 #2 Code with File.DirRootExternal = broken code. Code with File.DirDefaultExternal = broken code. Both will never work. Upvote 0
Code with File.DirRootExternal = broken code. Code with File.DirDefaultExternal = broken code. Both will never work.
vmag Active Member Nov 14, 2022 #3 Erel said: Code with File.DirRootExternal = broken code. Code with File.DirDefaultExternal = broken code. Both will never work. Click to expand... well, is there at least some way to just read the text file line by line from any external on android-31 + sdk? For example, there is a trivial task - analyzing the contents of files, it turns out that only files installed with the program can be analyzed? Upvote 0
Erel said: Code with File.DirRootExternal = broken code. Code with File.DirDefaultExternal = broken code. Both will never work. Click to expand... well, is there at least some way to just read the text file line by line from any external on android-31 + sdk? For example, there is a trivial task - analyzing the contents of files, it turns out that only files installed with the program can be analyzed?
Erel B4X founder Staff member Licensed User Longtime User Nov 15, 2022 #4 vmag said: For example, there is a trivial task - analyzing the contents of files Click to expand... Google doesn't allow developers to directly access the external storage. You should use ContentChooser to let the user choose the file and then read it with File.ReadList. This is actually quite trivial. Code: Copy Dim CC As ContentChooser CC.Initialize("cc") CC.Show("text/*", "choose image") Wait For CC_Result (Success As Boolean, Dir As String, FileName As String) If Success Then Dim lines As List = File.ReadList(Dir, FileName) End If Upvote 1
vmag said: For example, there is a trivial task - analyzing the contents of files Click to expand... Google doesn't allow developers to directly access the external storage. You should use ContentChooser to let the user choose the file and then read it with File.ReadList. This is actually quite trivial. Code: Copy Dim CC As ContentChooser CC.Initialize("cc") CC.Show("text/*", "choose image") Wait For CC_Result (Success As Boolean, Dir As String, FileName As String) If Success Then Dim lines As List = File.ReadList(Dir, FileName) End If
vmag Active Member Nov 15, 2022 #5 I felt that the solution should be simple, but I didn't think that to such an extent... I've seen a lot of forums, but here is probably the most adequate support. Thank you very much! May God grant you all good health and a great mind for many years to come. Upvote 0
I felt that the solution should be simple, but I didn't think that to such an extent... I've seen a lot of forums, but here is probably the most adequate support. Thank you very much! May God grant you all good health and a great mind for many years to come.