When running in the debug mode the text file myList.txt is not found and the message box is displayed. In release mode there's no problem. I have no idea, why. Here's the code:
B4X:
If File.Exists(File.DirAssets, "myList.txt") Then
Dim tr As TextReader
tr.Initialize2(File.OpenInput(File.DirAssets, "myList.txt"), "ISO-8859-1")
datalist = tr.ReadList
tr.Close
Else
Msgbox("myList.txt is missing","Attention!")
End If
Thanks, Erel. I skipped the File.Exists command - and it works fine.
I used TextReader instead of File.ReadList because of the German "Umlaute". After my opinion I cannot enable ISO-8859-1 in File.ReadList. But may be, I'm wrong ...