B4A Tutorial Using CallSubDelayed to interact between activities and services - Erel    Jun 14, 2012   (17 reactions)   tags: activity, two activity pass value, interact, between process global variables. CallSubDelayed makes it much simpler. It allows you to call a sub in... automatically. When the target module is ready, the sub will be called. CallSubDelayed doesn't... this message and passes it to the target module when it is ready. CallSubDelayed can also be used... make it clear, you do not need to call StartActivity or StartService when you use CallSubDelayed. CallSubDelayed is the recommended method for interaction between activities and services. Note... B4A Question [B4X] B4XPages - ShowPage with Parameters like CallSubDelayed2 - Alexander Stolte    Jun 14, 2020 How can i show a B4XPage with parameters?... Wish Unlimited number of arguments when using CallSub/CallSubDelayed - LucaMs    Jul 1, 2019 within the Activity itself, I simply use: RoutineName(Param1, Param2). I also called it from a service module and also using CallSubDelayed again from within the Activity. I needed to modify that routine by adding a third parameter but CallSubDelayed3 can be used to pass two arguments only, as you know...) I don't know if creating a CallSubDelayed4 (and CallSub4) that allows you to send... B4A Question CallSubDelayed to open an Activity - LucaMs    Jul 28, 2018   (1 reaction) (routine) ** Activity (main) Resume ** srvservice uses CallSubDelayed to call a routine of act2... of act2 sending message to waiting queue (CallSubDelayed - Routine) ** Activity (main) Resume ** srvservice uses CallSubDelayed to call a routine of act2, which is never executed. ...I was convinced that by calling from a service a routine of an Activity currently not in Foreground... Foreground (the app itself is in Foreground); if the app is paused, the call is added to a queue... Italian CallSubDelayed2 - Fulvio75    Feb 28, 2023 Ciao, il CallSubDelayed posto all'interno di una Classe chiama una sub dentro in un modulo?
Mi da errore durante la compilazione:
CallSubDelayed2(BlueTooth... Bug? Callsubdelayed and services, function not being called. - Jmu5667    Feb 9, 2023 Hello
I would like to know if I am wrong in the following assumption. Previously when using callsubdelayed(my_service,"some_function"), if the service was not running it would be started and then the function would be called.
I have noticed recently with the new version of B4A, this does not seem to the case. the service is started but the function is not called.
Regards
John.... B4A Question Advantages and disadvantages between "CallSubDelayed" and "Wait For" - vecino    Dec 9, 2021 option.
Thank you.
Sub timgv1_Click(X As Int, Y As Int)
CallSubDelayed3("","ControlarUbicacion",X,Y)
End Sub
Sub ControlarUbicacion( X As Int, Y As Int )
' Do something here.
End Sub
Sub timgv1_Click(X As Int, Y As Int)
Wait For (ControlarUbicacion(X,Y)) complete... B4J Question CallSubDelayed timings - Erel (first post)    Dec 24, 2025   (1 reaction) CallSubDelayed sends a message to the message queue. When the main thread is not busy running other code, it will process the message and execute that sub.
So without Sleep or Wait For, the two code snippets are equivalent.
A call to Sleep will cause the called sub to be executed.... B4J Question CallSubDelayed causes exception for sub not found [problem fixed itself...] - Didier99 (first post)    Dec 12, 2025 :
Sub Class_Globals
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
End Sub
Public Sub DoIt
CallSubDelayed(Me, "setHeight... B4A Code Snippet CallSubDelayed & ScrollView.ScrollPosition - KMatle    Feb 16, 2017 command to another sub and call it with "CallSubDelayed2". Sub AddManyViewsToASrollView 'add a lot of views in a loop CallSubDelayed2(Me,"Scroll2Pos",SV.Panel.Height) 'scrolls to the panel height = last added view End Sub Sub Scroll2Pos (pos As Int) SV.ScrollPosition=pos 'SV is defined in globals End Sub Of course you can change the code and call the sub with the SV as a parameter to make it more flexible.... Page: 1   2   3   4   5   6   7   |