'Class module
Sub Class_Globals
Private component1 As Object
Private sub1 As String
Public start_even_if_activity_is_in_background As Boolean
Public argument1 As Object
Public argument2 As Object
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize(activity_or_component As Object,sub_to_call As String)
component1=activity_or_component
sub1=sub_to_call
start_even_if_activity_is_in_background=True
argument1=Null
argument2=Null
End Sub
Public Sub start_call As Boolean
l.DebugLog("start_call")
Dim returnw=False
If component1<>Null AND sub1<>Null Then
If start_even_if_activity_is_in_background OR IsPaused(component1)=False Then
If argument1<>Null Then
If argument2<>Null Then
l.DebugLog("CallSubDelayed3 " & sub1)
CallSubDelayed3(component1,sub1,argument1,argument2)
returnw=True
Else
l.DebugLog("CallSubDelayed2 " & sub1)
CallSubDelayed2(component1,sub1,argument1)
returnw=True
End If
Else
l.DebugLog("CallSubDelayed " & sub1)
CallSubDelayed(component1,sub1)
returnw=True
End If
End If
End If
Return returnw
End Sub