I have this code in the Main Activity:
SubExists returns False in both ways, with or without quote.
Activity2:
Here, SubExists finds GetResult.
B4X:
Sub Button1_Click
'This call will bring Activity2 to front and will then execute ShowList
If SubExists("Activity2", "ShowList") Then ' don't works
' If SubExists(Activity2, "ShowList") Then ' don't works
CallSubDelayed3("Activity2", "ShowList", "Main", "This is the title")
End If
End Sub
SubExists returns False in both ways, with or without quote.
Activity2:
B4X:
Public Sub ShowList(Caller As String, Title As String)
mCaller = Caller
Activity.Title = Title
End Sub
Sub ListView1_ItemClick (Position As Int, Value As Object)
'this call will bring Main to front and call GetResult
If SubExists(mCaller, "GetResult") Then
CallSubDelayed2(mCaller, "GetResult", Value)
End If
End Sub
Here, SubExists finds GetResult.