FileDocCategorySizeDatePackage
AdvertiseCallback.javaAPI DocAndroid 5.1 API2360Thu Mar 12 22:22:10 GMT 2015android.bluetooth.le

AdvertiseCallback

public abstract class AdvertiseCallback extends Object
Bluetooth LE advertising callbacks, used to deliver advertising operation status.

Fields Summary
public static final int
ADVERTISE_SUCCESS
The requested operation was successful.
public static final int
ADVERTISE_FAILED_DATA_TOO_LARGE
Failed to start advertising as the advertise data to be broadcasted is larger than 31 bytes.
public static final int
ADVERTISE_FAILED_TOO_MANY_ADVERTISERS
Failed to start advertising because no advertising instance is available.
public static final int
ADVERTISE_FAILED_ALREADY_STARTED
Failed to start advertising as the advertising is already started.
public static final int
ADVERTISE_FAILED_INTERNAL_ERROR
Operation failed due to an internal error.
public static final int
ADVERTISE_FAILED_FEATURE_UNSUPPORTED
This feature is not supported on this platform.
Constructors Summary
Methods Summary
public voidonStartFailure(int errorCode)
Callback when advertising could not be started.

param
errorCode Error code (see ADVERTISE_FAILED_* constants) for advertising start failures.

    
public voidonStartSuccess(AdvertiseSettings settingsInEffect)
Callback triggered in response to {@link BluetoothLeAdvertiser#startAdvertising} indicating that the advertising has been started successfully.

param
settingsInEffect The actual settings used for advertising, which may be different from what has been requested.