Reading advertisement config

Hi all,

I am trying to read the advertisement config via the Settings API. But I always end up with an timeout exception in the Async handler. Is there some special handling for this config?

Some parts of the code:

// Read the config on a connected device (I can start the sensors, read battery level etc)
AsyncOperation<Settings.AdvertisementConfig> result = settings.readAdConfig();
result.onComplete(readAdvertisingParametersHandler);
// Handler
private final AsyncOperation.CompletionHandler<Settings.AdvertisementConfig> readAdvertisingParametersHandler =
new AsyncOperation.CompletionHandler<Settings.AdvertisementConfig>() {
@Override
public void success(Settings.AdvertisementConfig result) {
		// never reached
	}

@Override
public void failure(Throwable error) {
// Always timeoutexception here
}
};

Comments

  • What firmware and API versions are you using?
  • Firmware 1.2.4 and API 2.6.0.

    Looking at the Changelogs for newer versions of the API, the 2.7.0 version seems to fix some issues looking like the one I have.

    I'll see if I can upgrade to the latest version.
  • Hi, Just an update to tell that the new firmware and API solved the problem.

    Thanks for the pointer!
This discussion has been closed.