Hi folks!
I want to protect my app while using a global timer. After 2 minutes without any action within the app, a special activity should be loaded and displayed.
From my main activity I call this:
The problem is now, that my app could not find the "globaltimer_tick" sub.
What can I do in this case.
I could implement in each (!) activy the same code which several different timers. But this makes no sense in my case, because there so many activities in my app.
I want to have a global timer and a global tick event sub, which is able to load my "protect" activity in order to protect my app data.
Can anybody help here!
Thanks a lot in advance and best regards
ARTsoft
I want to protect my app while using a global timer. After 2 minutes without any action within the app, a special activity should be loaded and displayed.
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Public globalTimer As Timer
End Sub
From my main activity I call this:
B4X:
Public Sub timerRenew()
globalTimer.Initialize("globaltimer", 2 * 60000) ' 2 min
globalTimer.Enabled = True
End Sub
Sub globaltimer_tick
globalTimer.Enabled = False
StartActivity(Protect)
End Sub
The problem is now, that my app could not find the "globaltimer_tick" sub.
What can I do in this case.
I could implement in each (!) activy the same code which several different timers. But this makes no sense in my case, because there so many activities in my app.
I want to have a global timer and a global tick event sub, which is able to load my "protect" activity in order to protect my app data.
Can anybody help here!
Thanks a lot in advance and best regards
ARTsoft