I'm writing a C++ code that displays a wait note while performing bluetooth device discovery and then service discovery for each discovered device. I used RHostResolver to do the device discovery. The wait note is working just fine with the device discovery that is because I used the sync version of RHostResolver::GetByAddress() & RHostResolver::Next() (Remember that wait note functionality is async.) so there is no conflect between wait note operation & device discovery.
Now when it comes to the service discovery, it's a completely different situation. The CSdpAgent::NextRecordRequestL() does not have a sync version, instead it performs only async operation and when it's done it calls back the MSdpAgentNotifier::NextRecordRequestComplete(). The problem is that as long as the wait note is running, the MSdpAgentNotifier::NextRecordRequestComplete() will never be scheduled for execution.
I searched the forums and the SDK documentation, the only thing realted that I found was this line from the documentation of CSdpAgent class:
Note that queries are asynchronous, although this is hidden in the API. The implication is that the interface functions that receive responses are only called when the thread's active scheduler can schedule handling of the completion of the query.
I'm not sure of what exactly that means in my situation so to sum up I have this very simple question:
IS IT POSSIBLE TO USE WAIT NOTE AND SERVICE DISCOVERY TOGETHER (i.e. TO DISPLAY THE WAIT NOTE WHILE PERFORMING THE SERVICE DISCOVERY) ?![]()
And if the answer is YES, then how ?![]()



