I'm calling an AIDL service from within an IntentService. Once binding to the AIDL service is done, the IntentService must pass a parameter to the AIDL service for execution.
Now since binding to the AIDL takes takes place asynchornously, I want the code in IntentService to wait it out, before passing the parameter to the AIDL service.
pseudoCode:
STEP 1: Bind to AIDL service
STEP 2: Pass parameter to AIDL service
In other words, STEP2 is reached even before STEP 1 completes, coz binding to AIDL is asynchronous. Then I get exceptions.
How do I wait for STEP 1 to complete, before STEP 2 executes ?