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
}
};
This discussion has been closed.
Comments