@ProviderType
public interface BluetoothLeDevice
Modifier and Type | Method and Description |
---|---|
void |
cancelPairing()
Cancel a pairing operation
|
void |
connect()
A connection to this device is established, connecting each profile
flagged as auto-connectable.
|
void |
connectProfile(java.util.UUID uuid)
Connects a specific profile available on the device, given by UUID
|
void |
disconnect()
Disconnect from this device, removing all connected profiles.
|
void |
disconnectProfile(java.util.UUID uuid)
Disconnects a specific profile available on the device, given by UUID
|
BluetoothLeGattService |
findService(java.util.UUID uuid)
Find a BluetoothLeGattService specifying the UUID of the service.
|
java.util.List<BluetoothLeGattService> |
findServices()
Returns a list of BluetoothGattServices available on this device.
|
BluetoothLeAdapter |
getAdapter()
Returns the adapter on which this device was discovered or
connected.
|
java.lang.String |
getAddress()
Returns the hardware address of this device.
|
java.lang.String |
getAlias()
Returns an alternative friendly name of this device.
|
short |
getAppearance()
Returns the appearance of the device, as found by GAP service.
|
int |
getBluetoothClass()
Returns the Bluetooth class of the device.
|
java.lang.String |
getIcon()
Returns the proposed icon name of the device.
|
java.util.Map<java.lang.Short,byte[]> |
getManufacturerData()
Returns a map containing manufacturer specific advertisement data.
|
java.lang.String |
getModalias()
Returns the local ID of the adapter.
|
java.lang.String |
getName()
Returns the remote friendly name of this device.
|
short |
getRSSI()
Returns the Received Signal Strength Indicator of the device.
|
java.util.Map<java.util.UUID,byte[]> |
getServiceData()
Returns a map containing service advertisement data.
|
short |
getTxPower()
Returns the transmission power level (0 means unknown).
|
java.util.UUID[] |
getUUIDs()
Returns the UUIDs of the device.
|
boolean |
isBlocked()
Returns the blocked state the device.
|
boolean |
isConnected()
Returns the connected state of the device.
|
boolean |
isLegacyPairing()
Returns if device uses only pre-Bluetooth 2.1 pairing mechanism.
|
boolean |
isPaired()
Returns the paired state the device.
|
boolean |
isTrusted()
Returns the trusted state the device.
|
void |
pair()
A connection to this device is established, and the device is then
paired.
|
void |
setAlias(java.lang.String value)
Sets an alternative friendly name of this device.
|
void |
setBlocked(boolean value)
Sets the blocked state the device.
|
void |
setTrusted(boolean value)
Sets the trusted state the device.
|
BluetoothLeGattService findService(java.util.UUID uuid) throws KuraBluetoothResourceNotFoundException
uuid
- The UUID of the GATT serviceKuraBluetoothResourceNotFoundException
java.util.List<BluetoothLeGattService> findServices() throws KuraBluetoothResourceNotFoundException
KuraBluetoothResourceNotFoundException
void disconnect() throws KuraBluetoothConnectionException
KuraBluetoothConnectionException
void connect() throws KuraBluetoothConnectionException
KuraBluetoothConnectionException
void connectProfile(java.util.UUID uuid) throws KuraBluetoothConnectionException
uuid
- The UUID of the profile to be connectedKuraBluetoothConnectionException
void disconnectProfile(java.util.UUID uuid) throws KuraBluetoothConnectionException
uuid
- The UUID of the profile to be disconnectedKuraBluetoothConnectionException
void pair() throws KuraBluetoothPairException
KuraBluetoothPairException
void cancelPairing() throws KuraBluetoothPairException
KuraBluetoothPairException
java.lang.String getAddress()
java.lang.String getName()
java.lang.String getAlias()
void setAlias(java.lang.String value)
int getBluetoothClass()
short getAppearance()
java.lang.String getIcon()
boolean isPaired()
boolean isTrusted()
void setTrusted(boolean value)
boolean isBlocked()
void setBlocked(boolean value)
boolean isLegacyPairing()
short getRSSI()
boolean isConnected()
java.util.UUID[] getUUIDs()
java.lang.String getModalias()
BluetoothLeAdapter getAdapter()
java.util.Map<java.lang.Short,byte[]> getManufacturerData()
java.util.Map<java.util.UUID,byte[]> getServiceData()
short getTxPower()