I tested the code from post #36 and the file from post #14 on my Samsung Galaxy S10.
I copied the file into File.DirAssest for the test.
And the code from post #36 works OK in Release mode, but not in Debug mode.
The test code:
Sub ReadFile
Dim lst As List
lst.Initialize
Try
Log("Begin")
Dim rd As TextReader
rd.Initialize(File.OpenInput(FolderName, FileName))
Dim strLines As String= rd.ReadLine
Do While strLines <> Null
lst.Add(strLines)
strLines = rd.ReadLine
Loop
Log(lst.Size)
Log(lst.Get(0))
Log(lst.Get(lst.Size - 1))
Catch
Log(LastException)
End Try
End Sub
The logs in Release mode, the number of lines is OK and the content of the last line is OK.:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Begin
1826551
0 HEAD
0 TRLR
** Activity (main) Resume **
And the logs in Debug mode.
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Begin
(ErrnoException) android.system.ErrnoException: open failed: ENOENT (No such file or directory)
** Activity (main) Resume **
I suppose that for the Debugger the file is too big.