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.
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?
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.
B4X:
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
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.