public abstract class AdvertiseCallback extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ADVERTISE_FAILED_ALREADY_STARTED
Failed to start advertising as the advertising is already started.
|
static int |
ADVERTISE_FAILED_DATA_TOO_LARGE
Failed to start advertising as the advertise data to be broadcasted is larger than 31 bytes.
|
static int |
ADVERTISE_FAILED_FEATURE_UNSUPPORTED
This feature is not supported on this platform.
|
static int |
ADVERTISE_FAILED_INTERNAL_ERROR
Operation failed due to an internal error.
|
static int |
ADVERTISE_FAILED_TOO_MANY_ADVERTISERS
Failed to start advertising because no advertising instance is available.
|
static int |
ADVERTISE_SUCCESS
The requested operation was successful.
|
Constructor and Description |
---|
AdvertiseCallback() |
Modifier and Type | Method and Description |
---|---|
void |
onStartFailure(int errorCode)
Callback when advertising could not be started.
|
void |
onStartSuccess(AdvertiseSettings settingsInEffect)
Callback triggered in response to
BluetoothLeAdvertiser.startAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback) indicating
that the advertising has been started successfully. |
public static final int ADVERTISE_SUCCESS
public static final int ADVERTISE_FAILED_DATA_TOO_LARGE
public static final int ADVERTISE_FAILED_TOO_MANY_ADVERTISERS
public static final int ADVERTISE_FAILED_ALREADY_STARTED
public static final int ADVERTISE_FAILED_INTERNAL_ERROR
public static final int ADVERTISE_FAILED_FEATURE_UNSUPPORTED
public void onStartSuccess(AdvertiseSettings settingsInEffect)
BluetoothLeAdvertiser.startAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback)
indicating
that the advertising has been started successfully.settingsInEffect
- The actual settings used for advertising, which may be different from
what has been requested.public void onStartFailure(int errorCode)
errorCode
- Error code (see ADVERTISE_FAILED_* constants) for advertising start
failures.