AdvertisingSetCallback
abstract class AdvertisingSetCallback
kotlin.Any | |
↳ | android.bluetooth.le.AdvertisingSetCallback |
Bluetooth LE advertising set callbacks, used to deliver advertising operation status.
Summary
Constants | |
---|---|
static Int |
Failed to start advertising as the advertising is already started. |
static Int |
Failed to start advertising as the advertise data to be broadcasted is too large. |
static Int |
This feature is not supported on this platform. |
static Int |
Operation failed due to an internal error. |
static Int |
Failed to start advertising because no advertising instance is available. |
static Int |
The requested operation was successful. |
Public constructors | |
---|---|
Public methods | |
---|---|
open Unit |
onAdvertisingDataSet(advertisingSet: AdvertisingSet!, status: Int) Callback triggered in response to |
open Unit |
onAdvertisingEnabled(advertisingSet: AdvertisingSet!, enable: Boolean, status: Int) Callback triggered in response to android. |
open Unit |
onAdvertisingParametersUpdated(advertisingSet: AdvertisingSet!, txPower: Int, status: Int) Callback triggered in response to |
open Unit |
onAdvertisingSetStarted(advertisingSet: AdvertisingSet!, txPower: Int, status: Int) Callback triggered in response to android. |
open Unit |
onAdvertisingSetStopped(advertisingSet: AdvertisingSet!) Callback triggered in response to |
open Unit |
onPeriodicAdvertisingDataSet(advertisingSet: AdvertisingSet!, status: Int) Callback triggered in response to |
open Unit |
onPeriodicAdvertisingEnabled(advertisingSet: AdvertisingSet!, enable: Boolean, status: Int) Callback triggered in response to |
open Unit |
onPeriodicAdvertisingParametersUpdated(advertisingSet: AdvertisingSet!, status: Int) Callback triggered in response to |
open Unit |
onScanResponseDataSet(advertisingSet: AdvertisingSet!, status: Int) Callback triggered in response to |
Constants
ADVERTISE_FAILED_ALREADY_STARTED
static val ADVERTISE_FAILED_ALREADY_STARTED: Int
Failed to start advertising as the advertising is already started.
Value: 3
ADVERTISE_FAILED_DATA_TOO_LARGE
static val ADVERTISE_FAILED_DATA_TOO_LARGE: Int
Failed to start advertising as the advertise data to be broadcasted is too large.
Value: 1
ADVERTISE_FAILED_FEATURE_UNSUPPORTED
static val ADVERTISE_FAILED_FEATURE_UNSUPPORTED: Int
This feature is not supported on this platform.
Value: 5
ADVERTISE_FAILED_INTERNAL_ERROR
static val ADVERTISE_FAILED_INTERNAL_ERROR: Int
Operation failed due to an internal error.
Value: 4
ADVERTISE_FAILED_TOO_MANY_ADVERTISERS
static val ADVERTISE_FAILED_TOO_MANY_ADVERTISERS: Int
Failed to start advertising because no advertising instance is available.
Value: 2
ADVERTISE_SUCCESS
static val ADVERTISE_SUCCESS: Int
The requested operation was successful.
Value: 0
Public constructors
Public methods
onAdvertisingDataSet
open fun onAdvertisingDataSet(
advertisingSet: AdvertisingSet!,
status: Int
): Unit
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. |
onAdvertisingEnabled
open fun onAdvertisingEnabled(
advertisingSet: AdvertisingSet!,
enable: Boolean,
status: Int
): Unit
Callback triggered in response to android.bluetooth.le.BluetoothLeAdvertiser#startAdvertisingSet indicating result of the operation. If status is ADVERTISE_SUCCESS, then advertising set is advertising.
Parameters | |
---|---|
advertisingSet |
AdvertisingSet!: The advertising set. |
status |
Int: Status of the operation. |
onAdvertisingParametersUpdated
open fun onAdvertisingParametersUpdated(
advertisingSet: AdvertisingSet!,
txPower: Int,
status: Int
): Unit
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. |
onAdvertisingSetStarted
open fun onAdvertisingSetStarted(
advertisingSet: AdvertisingSet!,
txPower: Int,
status: Int
): Unit
Callback triggered in response to android.bluetooth.le.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. |
onAdvertisingSetStopped
open fun onAdvertisingSetStopped(advertisingSet: AdvertisingSet!): Unit
Callback triggered in response to BluetoothLeAdvertiser.stopAdvertisingSet
indicating advertising set is stopped.
Parameters | |
---|---|
advertisingSet |
AdvertisingSet!: The advertising set. |
onPeriodicAdvertisingDataSet
open fun onPeriodicAdvertisingDataSet(
advertisingSet: AdvertisingSet!,
status: Int
): Unit
Callback triggered in response to AdvertisingSet.setPeriodicAdvertisingData
indicating result of the operation.
Parameters | |
---|---|
advertisingSet |
AdvertisingSet!: The advertising set. |
status |
Int: Status of the operation. |
onPeriodicAdvertisingEnabled
open fun onPeriodicAdvertisingEnabled(
advertisingSet: AdvertisingSet!,
enable: Boolean,
status: Int
): Unit
Callback triggered in response to AdvertisingSet.setPeriodicAdvertisingEnabled
indicating result of the operation.
Parameters | |
---|---|
advertisingSet |
AdvertisingSet!: The advertising set. |
status |
Int: Status of the operation. |
onPeriodicAdvertisingParametersUpdated
open fun onPeriodicAdvertisingParametersUpdated(
advertisingSet: AdvertisingSet!,
status: Int
): Unit
Callback triggered in response to AdvertisingSet.setPeriodicAdvertisingParameters
indicating result of the operation.
Parameters | |
---|---|
advertisingSet |
AdvertisingSet!: The advertising set. |
status |
Int: Status of the operation. |
onScanResponseDataSet
open fun onScanResponseDataSet(
advertisingSet: AdvertisingSet!,
status: Int
): Unit
Callback triggered in response to AdvertisingSet.setAdvertisingData
indicating result of the operation.
Parameters | |
---|---|
advertisingSet |
AdvertisingSet!: The advertising set. |
status |
Int: Status of the operation. |