is there a timer like class that can get a parameter ?
any lib that has that ? (I know I can build it myself using some external MAP or something like that)
I want to do something like this.
B4X:
Sub PE_PhoneStateChanged(State As String, IncomingNumber As String, Intent As Intent)
t1.Initialize("checkLog",1000*5,IncomingNumber)
End Sub
Sub checkLog_Tick (num As String)
' do something with the phone number
End Sub
Sub Globals
Dim num As String
End Sub
Sub PE_PhoneStateChanged(State As String, IncomingNumber As String, Intent As Intent)
num = IncomingNumber
t1.Initialize("checkLog",1000*5)
End Sub
Sub checkLog_Tick
' do something with the phone number in the global variable num
End Sub
Sub Globals
Dim num As String
End Sub
Sub PE_PhoneStateChanged(State As String, IncomingNumber As String, Intent As Intent)
num = IncomingNumber
t1.Initialize("checkLog",1000*5)
End Sub
Sub checkLog_Tick
' do something with the phone number in the global variable num
End Sub
the problem with that solution is that if I get two events within 5 second (even if two diffeerent events) the second one will override the first one, in my case I want to fire two events both with different parameters (two numbers)
I can do this using map or some multi objects container, but I was wondering how come no one build such a thing before