i have tested App in debug mode and all is working.
My code:
In therapy class module i have timer, 1000 ms
In Main i have:
Also this is working. Only updating the label will not work in release mode.
My code:
In therapy class module i have timer, 1000 ms
B4X:
Sub timer1_tick
Log(tconst & " " & DateTime.Time(DateTime.Now))
Log("Headset state: " & Main.con_head)
If Main.con_head = False Then
MediaPlayer1.Stop
tconst = 0
Main.krogec_text("continue")
timer1.Enabled = False
Return
End If
If play_state = False Then 'ustavi impulze
MediaPlayer1.Stop
timer1.Enabled = False
tconst = 0
Main.krogec_text(Main.napis_krog(0))
Return
End If
Dim t As Long = Max(0,targetTime - DateTime.Now)
'Log ("t = : " & t)
Dim hours, minutes, seconds As Int
hours = t / DateTime.TicksPerHour
minutes = (t Mod DateTime.TicksPerHour) / DateTime.TicksPerMinute
seconds = (t Mod DateTime.TicksPerMinute) / DateTime.TicksPerSecond
Dim ura_text As String = $"$2.0{hours}:$2.0{minutes}:$2.0{seconds}"$
Log(ura_text)
For x = 0 To 5
Main.napis_time_down(x).Text = ura_text
Next
trajanje = trajanje + 1
In Main i have:
B4X:
Dim napis_time_down(4) As Label[CODE]
In napis_time_down i shoe time remaining to end of therapy.
But, in debug mode this is working, in release mode the napis_time_down is not "refreshed".
If i wish to hide the label, i have:
[CODE]
for x = 0 to 5
Main.napis_time_down(x).Visible = False
Also this is working. Only updating the label will not work in release mode.
Last edited: