Basic4android v2.0 will include a new set of keywords named: CallSubDelayed, CallSubDelayed2 and CallSubDelayed3.
CallSubDelayed will remove the need to store temporary values in process global variables and then read them from Service_Start or Activity_Resume.
With CallSubDelayed the internal framework takes care of starting the target module (activity or service) if needed and waiting for it to be ready. If the target module cannot be started (for example the user has turned off the screen, so the activity cannot resume) then the call will wait in a special queue and will be processed when the activity resumes.
CallSubDelayed works by sending a message to the main message queue. This means that the sub will not be called immediately. The code will continue to execute and when the thread is free to handle messages it will call the sub.
CallSubDelayed2 and CallSubDelayed3 are similar to CallSubDelayed. They work with subs that expect one or two arguments.
CallSubDelayed keywords will make it much simpler and cleaner to work with services and multiple activities.
CallSubDelayed is a combination of StartActivity, StartService and CallSub. Unlike CallSub which only works with currently running components, CallSubDelayed will first start the target component if needed. CallSubDelayed can also be used to call subs in the current module. Instead of calling these subs directly, a message will be sent to the message queue. The sub will be called when the message is processed. This is useful in cases where you want to do something "right after" the current sub (usually related to UI events).
CallSubDelayed will remove the need to store temporary values in process global variables and then read them from Service_Start or Activity_Resume.
With CallSubDelayed the internal framework takes care of starting the target module (activity or service) if needed and waiting for it to be ready. If the target module cannot be started (for example the user has turned off the screen, so the activity cannot resume) then the call will wait in a special queue and will be processed when the activity resumes.
CallSubDelayed works by sending a message to the main message queue. This means that the sub will not be called immediately. The code will continue to execute and when the thread is free to handle messages it will call the sub.
CallSubDelayed2 and CallSubDelayed3 are similar to CallSubDelayed. They work with subs that expect one or two arguments.
CallSubDelayed keywords will make it much simpler and cleaner to work with services and multiple activities.