Package | Description |
---|---|
ej.bluetooth |
Contains Bluetooth classes.
|
ej.bluetooth.callbacks |
Contains interfaces for Bluetooth callbacks.
|
ej.bluetooth.callbacks.impl |
Contains default implementations for Bluetooth callbacks.
|
Modifier and Type | Method and Description |
---|---|
BluetoothDevice[] |
BluetoothAdapter.getConnectedDevices()
Returns the list of devices to which this adapter is connected.
|
BluetoothDevice[] |
BluetoothAdapter.getDevices()
Returns the list of devices known by this adapter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
BluetoothCharacteristic.sendNotification(BluetoothDevice device,
byte[] value,
boolean confirm)
Sends a notification on this characteristic to the given device with the given value.
|
boolean |
BluetoothAttribute.sendReadResponse(BluetoothDevice device,
int status,
byte[] value)
Sends the response to a read request sent by the given device on this attribute.
|
boolean |
BluetoothAttribute.sendWriteResponse(BluetoothDevice device,
int status)
Sends the response to a write request sent by the given device on this attribute.
|
Modifier and Type | Method and Description |
---|---|
void |
ConnectionCallbacks.onConnected(BluetoothDevice device)
Called when a connection attempt is successful or when a remote device connects to the adapter.
|
void |
ConnectionCallbacks.onConnectFailed(BluetoothDevice device)
Called when a connection attempt fails.
|
void |
ConnectionCallbacks.onDisconnected(BluetoothDevice device)
Called when the connection with a device is closed.
|
void |
ServerCallbacks.onNotificationSent(BluetoothCharacteristic characteristic,
BluetoothDevice device,
boolean success)
Called when a characteristic notification is sent.
|
void |
ConnectionCallbacks.onPairCompleted(BluetoothDevice device,
boolean success)
Called when the pairing procedure with a device is completed.
|
void |
ConnectionCallbacks.onPairRequest(BluetoothDevice device)
Called when a pairing request from a device is received.
|
void |
ConnectionCallbacks.onPasskeyGenerated(BluetoothDevice device,
int passkey)
Called when a passkey is generated to be displayed to the user.
|
void |
ConnectionCallbacks.onPasskeyRequest(BluetoothDevice device)
Called when a passkey request from a device is received.
|
void |
ServerCallbacks.onReadRequest(BluetoothCharacteristic characteristic,
BluetoothDevice device)
Called when a read characteristic request is received.
|
void |
ServerCallbacks.onReadRequest(BluetoothDescriptor descriptor,
BluetoothDevice device)
Called when a read descriptor request is received.
|
void |
ScanCallbacks.onScanResult(BluetoothAdapter adapter,
BluetoothDevice device,
byte[] payload,
int rssi)
Called when a advertisement or a scan response is received.
|
void |
ConnectionCallbacks.onServicesDiscovered(BluetoothDevice device)
Called when the services of the device are discovered.
|
void |
ServerCallbacks.onWriteRequest(BluetoothCharacteristic characteristic,
BluetoothDevice device,
byte[] value)
Called when a write characteristic request is received.
|
void |
ServerCallbacks.onWriteRequest(BluetoothDescriptor descriptor,
BluetoothDevice device,
byte[] value)
Called when a write descriptor request is received.
|
Modifier and Type | Method and Description |
---|---|
void |
DefaultConnectionCallbacks.onConnected(BluetoothDevice device) |
void |
DefaultConnectionCallbacks.onConnectFailed(BluetoothDevice device) |
void |
DefaultConnectionCallbacks.onDisconnected(BluetoothDevice device) |
void |
DefaultServerCallbacks.onNotificationSent(BluetoothCharacteristic characteristic,
BluetoothDevice device,
boolean success) |
void |
DefaultConnectionCallbacks.onPairCompleted(BluetoothDevice device,
boolean success) |
void |
DefaultConnectionCallbacks.onPairRequest(BluetoothDevice device) |
void |
DefaultConnectionCallbacks.onPasskeyGenerated(BluetoothDevice device,
int passkey) |
void |
DefaultConnectionCallbacks.onPasskeyRequest(BluetoothDevice device) |
void |
DefaultServerCallbacks.onReadRequest(BluetoothCharacteristic characteristic,
BluetoothDevice device) |
void |
DefaultServerCallbacks.onReadRequest(BluetoothDescriptor descriptor,
BluetoothDevice device) |
void |
DefaultConnectionCallbacks.onServicesDiscovered(BluetoothDevice device) |
void |
DefaultServerCallbacks.onWriteRequest(BluetoothCharacteristic characteristic,
BluetoothDevice device,
byte[] value) |
void |
DefaultServerCallbacks.onWriteRequest(BluetoothDescriptor descriptor,
BluetoothDevice device,
byte[] value) |