@ProviderType
public interface BluetoothAdapter
| Modifier and Type | Method and Description |
|---|---|
void |
disable()
Disable the Bluetooth adapter
|
void |
enable()
Enable the Bluetooth adapter
|
void |
ExecuteCmd(java.lang.String ogf,
java.lang.String ocf,
java.lang.String parameter)
Execute a command to the given interface.
|
java.lang.String |
getAddress()
Get the MAC address of the Bluetooth adapter.
|
BluetoothDevice |
getRemoteDevice(java.lang.String address)
Get a remote Bluetooth device based on hardware adress
|
boolean |
isEnabled()
Return the status of the adapter
|
boolean |
isLeReady()
Return true if the adapter supports Bluetooth LE.
|
boolean |
isScanning()
Return true if a lescan is running
|
void |
killLeScan()
Kill the process started by startLeScan or startBeaconScan.
SIGINT must be sent to the hcitool process. |
void |
setBeaconAdvertisingData(java.lang.String uuid,
java.lang.Integer major,
java.lang.Integer minor,
java.lang.String companyCode,
java.lang.Integer txPower,
boolean LELimited,
boolean LEGeneral,
boolean BR_EDRSupported,
boolean LE_BRController,
boolean LE_BRHost)
Set the data in to the Beacon advertising packet for the given interface.
|
void |
setBeaconAdvertisingInterval(java.lang.Integer min,
java.lang.Integer max)
Set the Beacon advertising interval for the given interface.
|
void |
startAdvertisementScan(java.lang.String companyName,
BluetoothAdvertisementScanListener listener)
Starts an asynchronous scan for Bluetooth LE advertisements.
|
void |
startBeaconAdvertising()
Start Beacon advertising for the given interface.
|
void |
startBeaconScan(java.lang.String companyName,
BluetoothBeaconScanListener listener)
Starts an asynchronous scan for Bluetooth LE beacons.
|
void |
startLeScan(BluetoothLeScanListener listener)
Starts an asynchronous scan for Bluetooth LE devices.
|
void |
stopBeaconAdvertising()
Stop Beacon advertising for the given interface.
|
java.lang.String getAddress()
void killLeScan()
boolean isScanning()
boolean isEnabled()
boolean isLeReady()
void enable()
void disable()
void startLeScan(BluetoothLeScanListener listener)
BluetoothLeScanListener when the scan
is complete.listener - Interface for collecting scan resultsvoid startAdvertisementScan(java.lang.String companyName,
BluetoothAdvertisementScanListener listener)
BluetoothAdvertisementScanListener as it
arrives.companyName - Hexadecimal string representing the company codelistener - Interface for collecting beacon data.void startBeaconScan(java.lang.String companyName,
BluetoothBeaconScanListener listener)
BluetoothBeaconScanListener as it arrives.companyName - Hexadecimal string representing the company codelistener - Interface for collecting beacon data.BluetoothDevice getRemoteDevice(java.lang.String address)
address - Hardware address of remote devicevoid startBeaconAdvertising()
void stopBeaconAdvertising()
void setBeaconAdvertisingInterval(java.lang.Integer min,
java.lang.Integer max)
min - Minimum time interval between advertisesmax - Maximum time interval between advertisesvoid setBeaconAdvertisingData(java.lang.String uuid,
java.lang.Integer major,
java.lang.Integer minor,
java.lang.String companyCode,
java.lang.Integer txPower,
boolean LELimited,
boolean LEGeneral,
boolean BR_EDRSupported,
boolean LE_BRController,
boolean LE_BRHost)
uuid - Proximity UUIDmajor - Groups beacons with the same proximity UUIDminor - Differentiates beacons with the same proximity UUID and major valuetxPower - Transmitting power \@1mcompanyCode - Indicates the manufacturerLELimited - Indicates LE Limited Discoverable Mode (the device advertises for 30.72s and then stops)LEGeneral - Indicates LE General Discoverable Mode (the device advertises indefinitely)BR_EDRSupported - Indicates whether BR/EDR is supportedLE_BRController - Indicates whether LE and BR/EDR Controller operates simultaneouslyLE_BRHost - Indicates whether LE and BR/EDR Host operates simultaneouslyvoid ExecuteCmd(java.lang.String ogf,
java.lang.String ocf,
java.lang.String parameter)
ogf - OpCode Group Fieldocf - OpCode Command Fieldparameter - Parameters passed to the command