Hi everyone.
Is it possible to read string from text file every moment, without TextReader and Timer ?
Is it possible with AsyncStreamsText class ?
Now my code looks like:
Thanks!
Is it possible to read string from text file every moment, without TextReader and Timer ?
Is it possible with AsyncStreamsText class ?
Now my code looks like:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
tmr.Initialize("time",500)
tmr.Enabled = True
textreader1.Initialize(File.OpenInput("/dev/","ttyMT2"))
End Sub
Sub time_tick
Dim line As String
line = textreader1.ReadLine
Do While line <> Null
Log(line)
edittext2.Text = line
Loop
End Sub
Thanks!