public abstract class BluetoothCentralManagerCallback
extends java.lang.Object
Constructor and Description |
---|
BluetoothCentralManagerCallback() |
Modifier and Type | Method and Description |
---|---|
void |
onBluetoothAdapterStateChanged(int state)
Bluetooth adapter status changed
|
void |
onConnectedPeripheral(@NotNull BluetoothPeripheral peripheral)
Successfully connected with a peripheral.
|
void |
onConnectionFailed(@NotNull BluetoothPeripheral peripheral,
@NotNull HciStatus status)
Connecting with the peripheral has failed.
|
void |
onDisconnectedPeripheral(@NotNull BluetoothPeripheral peripheral,
@NotNull HciStatus status)
Peripheral disconnected
|
void |
onDiscoveredPeripheral(@NotNull BluetoothPeripheral peripheral,
@NotNull android.bluetooth.le.ScanResult scanResult)
Discovered a peripheral
|
void |
onScanFailed(@NotNull ScanFailure scanFailure)
Scanning failed
|
public void onConnectedPeripheral(@NotNull @NotNull BluetoothPeripheral peripheral)
peripheral
- the peripheral that was connected.public void onConnectionFailed(@NotNull @NotNull BluetoothPeripheral peripheral, @NotNull @NotNull HciStatus status)
peripheral
- the peripheral for which the connection was attemptedstatus
- the status code for the connection failurepublic void onDisconnectedPeripheral(@NotNull @NotNull BluetoothPeripheral peripheral, @NotNull @NotNull HciStatus status)
peripheral
- the peripheral that disconnected.status
- the status code for the disconnectionpublic void onDiscoveredPeripheral(@NotNull @NotNull BluetoothPeripheral peripheral, @NotNull @NotNull android.bluetooth.le.ScanResult scanResult)
peripheral
- the peripheral that was foundscanResult
- the scanResult describing the peripheralpublic void onScanFailed(@NotNull @NotNull ScanFailure scanFailure)
scanFailure
- the status code for the scanning failurepublic void onBluetoothAdapterStateChanged(int state)
state
- the current status code for the adapter