AdvertisingSetCallback
public
abstract
class
AdvertisingSetCallback
extends Object
| java.lang.Object | |
| ↳ | android.bluetooth.le.AdvertisingSetCallback |
Bluetooth LE advertising set callbacks, used to deliver advertising operation status.
Summary
Constants | |
|---|---|
int |
ADVERTISE_FAILED_ALREADY_STARTED
Failed to start advertising as the advertising is already started. |
int |
ADVERTISE_FAILED_DATA_TOO_LARGE
Failed to start advertising as the advertise data to be broadcasted is too large. |
int |
ADVERTISE_FAILED_FEATURE_UNSUPPORTED
This feature is not supported on this platform. |
int |
ADVERTISE_FAILED_INTERNAL_ERROR
Operation failed due to an internal error. |
int |
ADVERTISE_FAILED_TOO_MANY_ADVERTISERS
Failed to start advertising because no advertising instance is available. |
int |
ADVERTISE_SUCCESS
The requested operation was successful. |
Public constructors | |
|---|---|
AdvertisingSetCallback()
|
|
Public methods | |
|---|---|
void
|
onAdvertisingDataSet(AdvertisingSet advertisingSet, int status)
Callback triggered in response to |
void
|
onAdvertisingEnabled(AdvertisingSet advertisingSet, boolean enable, int status)
Callback triggered in response to |
void
|
onAdvertisingParametersUpdated(AdvertisingSet advertisingSet, int txPower, int status)
Callback triggered in response to |
void
|
onAdvertisingSetStarted(AdvertisingSet advertisingSet, int txPower, int status)
Callback triggered in response to |
void
|
onAdvertisingSetStopped(AdvertisingSet advertisingSet)
Callback triggered in response to |
void
|
onPeriodicAdvertisingDataSet(AdvertisingSet advertisingSet, int status)
Callback triggered in response to |
void
|
onPeriodicAdvertisingEnabled(AdvertisingSet advertisingSet, boolean enable, int status)
Callback triggered in response to |
void
|
onPeriodicAdvertisingParametersUpdated(AdvertisingSet advertisingSet, int status)
Callback triggered in response to |
void
|
onScanResponseDataSet(AdvertisingSet advertisingSet, int status)
Callback triggered in response to |
Inherited methods | |
|---|---|
Constants
ADVERTISE_FAILED_ALREADY_STARTED
public static final int ADVERTISE_FAILED_ALREADY_STARTED
Failed to start advertising as the advertising is already started.
Constant Value: 3 (0x00000003)
ADVERTISE_FAILED_DATA_TOO_LARGE
public static final int ADVERTISE_FAILED_DATA_TOO_LARGE
Failed to start advertising as the advertise data to be broadcasted is too large.
Constant Value: 1 (0x00000001)
ADVERTISE_FAILED_FEATURE_UNSUPPORTED
public static final int ADVERTISE_FAILED_FEATURE_UNSUPPORTED
This feature is not supported on this platform.
Constant Value: 5 (0x00000005)
ADVERTISE_FAILED_INTERNAL_ERROR
public static final int ADVERTISE_FAILED_INTERNAL_ERROR
Operation failed due to an internal error.
Constant Value: 4 (0x00000004)
ADVERTISE_FAILED_TOO_MANY_ADVERTISERS
public static final int ADVERTISE_FAILED_TOO_MANY_ADVERTISERS
Failed to start advertising because no advertising instance is available.
Constant Value: 2 (0x00000002)
ADVERTISE_SUCCESS
public static final int ADVERTISE_SUCCESS
The requested operation was successful.
Constant Value: 0 (0x00000000)
Public constructors
AdvertisingSetCallback
public AdvertisingSetCallback ()
Public methods
onAdvertisingDataSet
public void onAdvertisingDataSet (AdvertisingSet advertisingSet, int status)
Callback triggered in response to AdvertisingSet.setAdvertisingData indicating result
of the operation. If status is ADVERTISE_SUCCESS, then data was changed.
| Parameters | |
|---|---|
advertisingSet |
AdvertisingSet: The advertising set. |
status |
int: Status of the operation.
Value is one of the following: |
onAdvertisingEnabled
public void onAdvertisingEnabled (AdvertisingSet advertisingSet, boolean enable, int status)
Callback triggered in response to BluetoothLeAdvertiser.startAdvertisingSet
indicating result of the operation. If status is ADVERTISE_SUCCESS, then advertising set is
advertising.
This is also called with enable set to false and ERROR[hidden: #ADVERTISE_DURATION_EXPIRED] when the advertising set is stopped because its duration has
expired.
| Parameters | |
|---|---|
advertisingSet |
AdvertisingSet: The advertising set. |
enable |
boolean |
status |
int: Status of the operation.
Value is one of the following: |
onAdvertisingParametersUpdated
public void onAdvertisingParametersUpdated (AdvertisingSet advertisingSet, int txPower, int status)
Callback triggered in response to AdvertisingSet.setAdvertisingParameters indicating
result of the operation.
| Parameters | |
|---|---|
advertisingSet |
AdvertisingSet: The advertising set. |
txPower |
int: tx power that will be used for this set. |
status |
int: Status of the operation.
Value is one of the following: |
onAdvertisingSetStarted
public void onAdvertisingSetStarted (AdvertisingSet advertisingSet, int txPower, int status)
Callback triggered in response to BluetoothLeAdvertiser.startAdvertisingSet
indicating result of the operation. If status is ADVERTISE_SUCCESS, then advertisingSet
contains the started set and it is advertising. If error occurred, advertisingSet is null,
and status will be set to proper error code.
| Parameters | |
|---|---|
advertisingSet |
AdvertisingSet: The advertising set that was started or null if error. |
txPower |
int: tx power that will be used for this set. |
status |
int: Status of the operation.
Value is one of the following: |
onAdvertisingSetStopped
public void onAdvertisingSetStopped (AdvertisingSet advertisingSet)
Callback triggered in response to BluetoothLeAdvertiser.stopAdvertisingSet indicating
advertising set is stopped.
| Parameters | |
|---|---|
advertisingSet |
AdvertisingSet: The advertising set. |
onPeriodicAdvertisingDataSet
public void onPeriodicAdvertisingDataSet (AdvertisingSet advertisingSet, int status)
Callback triggered in response to AdvertisingSet.setPeriodicAdvertisingData
indicating result of the operation.
| Parameters | |
|---|---|
advertisingSet |
AdvertisingSet: The advertising set. |
status |
int: Status of the operation.
Value is one of the following: |
onPeriodicAdvertisingEnabled
public void onPeriodicAdvertisingEnabled (AdvertisingSet advertisingSet, boolean enable, int status)
Callback triggered in response to AdvertisingSet.setPeriodicAdvertisingEnabled
indicating result of the operation.
| Parameters | |
|---|---|
advertisingSet |
AdvertisingSet: The advertising set. |
enable |
boolean |
status |
int: Status of the operation.
Value is one of the following: |
onPeriodicAdvertisingParametersUpdated
public void onPeriodicAdvertisingParametersUpdated (AdvertisingSet advertisingSet, int status)
Callback triggered in response to AdvertisingSet.setPeriodicAdvertisingParameters
indicating result of the operation.
| Parameters | |
|---|---|
advertisingSet |
AdvertisingSet: The advertising set. |
status |
int: Status of the operation.
Value is one of the following: |
onScanResponseDataSet
public void onScanResponseDataSet (AdvertisingSet advertisingSet, int status)
Callback triggered in response to AdvertisingSet.setAdvertisingData indicating result
of the operation.
| Parameters | |
|---|---|
advertisingSet |
AdvertisingSet: The advertising set. |
status |
int: Status of the operation.
Value is one of the following: |