Android Question CallSubDelayed to service with no result

Nikan99

Member
Hello to all!
I am a big fan of "Wait For" thing. I like asynchronous events so I use them most of the times, but I have a question. I know by a variable, "CurrentActivity", in Starter (service) which activity is active (yes, I do not write in B4XPages, I can not move my project, as it is huge) and some times I do a
Wait For:
Wait For MyDummyEvent_Complete
in my activities. When the code is ready to proceed I do a
CallSubExample:
CallSubDelayed(Starter.CurrentActivity, "MyDummyEvent_Complete")
from a service so it "hits" the wait for and my code works.
But I need to do the wait for thing in some services, so my logic breaks as if I do Call Sub Delayed in activity it does not hit my service. My question is: Can I do
B4X:
CallSubDelayed(MyOtherService,"MyDummyEvent_Complete")
every time in the other service even if there is no wait for or it is bad as there is nothing to waits??
I am working on a big project and that is the reason that I can not upload it.
 
Solution
You have two options to intercept this call:
- event sub
- a call to wait for

Without one of them the service will be started (if needed) and nothing more will happen.
Top