public class BluetoothManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
BluetoothManager.BluetoothConnectionListener |
static interface |
BluetoothManager.BluetoothReaderFactory
This interface allows for external BluetoothReaders to be registered by a plugin.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnectionListener(BluetoothManager.BluetoothConnectionListener bcl)
Adds a connection listener for classic bluetooth devices.
|
void |
addExternalBluetoothReader(BluetoothManager.BluetoothReaderFactory brf)
Allows for plugins to create a reader for a specific bluetooth device.
|
void |
disableForATSK()
Deprecated.
|
void |
dispose() |
java.util.List<android.bluetooth.BluetoothDevice> |
getAllDevices()
Lists all Bluetooth devices currently known by the bluetooth manager.
|
java.util.List<android.bluetooth.BluetoothDevice> |
getConnections()
Lists all Bluetooth devices currently connected through the bluetooth manager.
|
android.content.Context |
getContext() |
static BluetoothManager |
getInstance() |
void |
interrupt()
Sets the interrupt flag which can be used by other methods within the Bluetooth
Manager.
|
void |
removeConnectionListener(BluetoothManager.BluetoothConnectionListener bcl)
Remove a connection listener for classic bluetooth devices.
|
void |
removeExternalBluetoothReader(BluetoothManager.BluetoothReaderFactory brf)
Removes a previously registered bluetooth reader factory.
|
void |
setContext(android.content.Context context) |
void |
start()
Start the scanning process.
|
void |
stop() |
public static BluetoothManager getInstance()
public void addExternalBluetoothReader(BluetoothManager.BluetoothReaderFactory brf)
brf
- the bluetooth reader factory.public void removeExternalBluetoothReader(BluetoothManager.BluetoothReaderFactory brf)
brf
- the bluetooth reader factory to remove.public java.util.List<android.bluetooth.BluetoothDevice> getAllDevices()
public java.util.List<android.bluetooth.BluetoothDevice> getConnections()
public void addConnectionListener(BluetoothManager.BluetoothConnectionListener bcl)
bcl
- the connection listenerpublic void removeConnectionListener(BluetoothManager.BluetoothConnectionListener bcl)
bcl
- the connection listener@Deprecated public void disableForATSK()
public android.content.Context getContext()
public void setContext(android.content.Context context)
public void interrupt()
public void start()
public void stop()
public void dispose()