Archived:New Bluetooth discovery should not be started from within DiscoveryListener's callback methods (Known Issue)
The article is believed to be still valid for the original topic scope.
Article Metadata
Tested with
Compatibility
Article
Overview
{Abstract|Bluetooth MIDlet fails starting new device and service discoveries when calling such methods from within DiscoveryListener.inquiryCompleted and DiscoveryListener.searchServicesCompleted callback methods. }]
Description
For service discovery, a new service discovery cannot be started with DiscoveryAgent.searchServices from within the DiscoveryListener.serviceSearchCompleted callback method. If searchServices is called from within serviceSearchCompleted, the searchServices call does not fail, but the servicesDiscovered will not be called again. The same applies for device discovery when calling DiscoveryAgent.startInquiry from within the DiscoveryListener.inquiryCompleted method.
Solution
The problem has been fixed in S60 3rd Edition, Feature Pack 2. For previous releases, try starting a new device and service discovery when the previous discovery has completed (that is, after serviceSearchCompleted and DiscoveryListener.inquiryCompleted have returned).


(no comments yet)