My app has a counter, counting seconds
semplified code [cut]
if the app in sent in backgound, e.g I open a another app, or the screen saver is active, the app goes to sleep - freezing. the timer stops running
(the Activity_pause sub is colled)
and it resume counting when the app is in foregroud again
(the Activity_resume sub is called)
see attacked image: it's the log
I saw PhoneWakeState, but it does different things (?)
SO:
How can I set the app to continue running also if another app in in foregroud, also if the screen goes off?
I need that my app is always active and doing his job - NO pause
thank you
semplified code [cut]
timer:
Sub Process_Globals
Dim tmrTimerIndirizzoIP As Timer
end sub
Sub Activity_Create(FirstTime As Boolean)
tmrTimerIndirizzoIP.Initialize("tmrTimerIndirizzoIP", 1000)
tmrTimerIndirizzoIP.Enabled=True
end sub
Sub Activity_Resume
Log("RESUME")
end Sub
Sub Activity_Pause (UserClosed As Boolean)
Log("IN PAUSA")
End Sub
Sub tmrTimerIndirizzoIP_Tick()
Log(DateTime.Date(DateTime.now) & " tick")
end sub
if the app in sent in backgound, e.g I open a another app, or the screen saver is active, the app goes to sleep - freezing. the timer stops running
(the Activity_pause sub is colled)
and it resume counting when the app is in foregroud again
(the Activity_resume sub is called)
see attacked image: it's the log
I saw PhoneWakeState, but it does different things (?)
SO:
How can I set the app to continue running also if another app in in foregroud, also if the screen goes off?
I need that my app is always active and doing his job - NO pause
thank you