public class BluetoothControllerImpl extends Object implements BluetoothController, BluetoothCallback, CachedBluetoothDevice.Callback
BluetoothController.Callback
Constructor and Description |
---|
BluetoothControllerImpl(Context context,
Looper bgLooper) |
public boolean canConfigBluetooth()
canConfigBluetooth
in interface BluetoothController
public void dump(FileDescriptor fd, PrintWriter pw, String[] args)
public void addStateChangedCallback(BluetoothController.Callback cb)
addStateChangedCallback
in interface BluetoothController
public void removeStateChangedCallback(BluetoothController.Callback cb)
removeStateChangedCallback
in interface BluetoothController
public boolean isBluetoothEnabled()
isBluetoothEnabled
in interface BluetoothController
public int getBluetoothState()
getBluetoothState
in interface BluetoothController
public boolean isBluetoothConnected()
isBluetoothConnected
in interface BluetoothController
public boolean isBluetoothConnecting()
isBluetoothConnecting
in interface BluetoothController
public void setBluetoothEnabled(boolean enabled)
setBluetoothEnabled
in interface BluetoothController
public boolean isBluetoothSupported()
isBluetoothSupported
in interface BluetoothController
public void connect(CachedBluetoothDevice device)
connect
in interface BluetoothController
public void disconnect(CachedBluetoothDevice device)
disconnect
in interface BluetoothController
public String getLastDeviceName()
getLastDeviceName
in interface BluetoothController
public Collection<CachedBluetoothDevice> getDevices()
getDevices
in interface BluetoothController
public void onBluetoothStateChanged(int bluetoothState)
onBluetoothStateChanged
in interface BluetoothCallback
public void onScanningStateChanged(boolean started)
onScanningStateChanged
in interface BluetoothCallback
public void onDeviceAdded(CachedBluetoothDevice cachedDevice)
onDeviceAdded
in interface BluetoothCallback
public void onDeviceDeleted(CachedBluetoothDevice cachedDevice)
onDeviceDeleted
in interface BluetoothCallback
public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState)
onDeviceBondStateChanged
in interface BluetoothCallback
public void onDeviceAttributesChanged()
onDeviceAttributesChanged
in interface CachedBluetoothDevice.Callback
public void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state)
onConnectionStateChanged
in interface BluetoothCallback