B4A Tutorial Using CallSubDelayed to interact between activities and services - Erel    
Jun 14, 2012   
(17 reactions) 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...
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 [B4X] B4XPages - ShowPage with Parameters like CallSubDelayed2 - Alexander Stolte    
Jun 14, 2020How can i show a B4XPage with parameters?...
link: .
Page2.SomeSubThatConfiguresEverythingNeeded(a, b, c, 100, 200)
B4XPages.ShowPage("page 2"...
link: Declare some Public Global variables in the page to be shown, set them appropriately before showing it. and check those variables in ...
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, 2023Ciao, il CallSubDelayed posto all'interno di una Classe chiama una sub dentro in un modulo?
Mi da errore durante la compilazione:
CallSubDelayed2(BlueTooth...
link:
https://www.b4x.com/android/forum/threads/convert-asciihex-to-binary.72135/#post-458634
Si trovato...
link: https://www.b4x.com/android/forum/threads/convert-asciihex-to-binary.72135/#post-458634...
link: Ok... Risolto...
Bug? Callsubdelayed and services, function not being called. - Jmu5667    
Feb 9, 2023Hello
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....
link: Works fine when I test it......
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...
link: So, to summarize, I understand that CallSubDelayed continues to execute the following instructions...
link: They are very different mechanisms. With CallSubDelayed execution continues, and the called method...
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....
B4A Question callsubdelayed2 how to close activity - tsteward    
Apr 26, 2021 a button on activity 2 calls callsubdelay2 to open activity3 "Feedback" when complete it uses callsubdelay2 to return to Vehicle and process and save the data collected in Feedback.
Whilst in...
link: Nearly 18 activities and probably 10,000 lines of code 9 years in the making.
Appreciate the sentim...
link: I'm sure you already know it: B4xPages solve any problem due to an app's lifecycle.
My sugg...
link: ok activity.finish after the callsubdelay seems to work
Thank you...
B4A Question [SOLVED] How to mimic CallSubDelayed2 in B4XPages? - incendio    
Jan 17, 2021Hi guys,
In Activities based app, I use this code
Sub btn_click
CallSubDelayed2(myMod,"ShowInfo","Info")
End Sub
That codes will bring myMod into active activity and Call sub ShowInfo.
How to mimic this behaviour in B4Pages based app?...
link: Everything is simpler with B4XPages.
You can directly call methods of other pages.
Best to create...
Page: 1  
2  
3  
4  
5  
6  
7