Class BluetoothState


public class BluetoothState extends Object
BluetoothState allows you to listen the current bluetooth state
  • Method Details

    • hasPermissionsToTurnOnBluetooth

      public boolean hasPermissionsToTurnOnBluetooth(android.content.Context context)
    • getValue

      public BluetoothState.Value getValue()
    • onBluetoothTurnedOn

      public void onBluetoothTurnedOn(BluetoothState.TurnOnListener listener)
      Wait until the first turn on event happens and unsubscribe the listener. Convenience method when you want to use lambda and not care about unregistering the listener.
    • addListener

      public void addListener(BluetoothState.Listener listener)
    • removeListener

      public void removeListener(BluetoothState.Listener listener)