IClassicBluetoothEventCallback

interface IClassicBluetoothEventCallback

IClassicBluetoothEventCallback

Description :

This interface represent the API for all event related to the Classic Bluetooth. This interface is used with the STWBluetoothClassicManager in order to delegate event linked to classic bluetooth.

Example of use :

  • Implementation :
    
     IClassicBluetoothEventCallback mClassicBluetoothEventCallback = new IClassicBluetoothEventCallback() {
    
    public boolean shouldHandleActions() {
    
    }
    
    public void onButtonPressed() {
    
    }
    
    public void onButtonReleased() {
    
    }
    }
    
  • Registration :
    
     STWBluetoothClassicManager.getInstance.registerIClassicBluetoothEventCallback(mClassicBluetoothEventCallback)
    
  • UnRegister :
    
     STWBluetoothClassicManager.getInstance.unregisterClassicBluetoothEventCallback(mClassicBluetoothEventCallback)
    

Functions

Link copied to clipboard
abstract fun onButtonPressed()
Callback triggered when receiving an ACTION_DOWN event.
Link copied to clipboard
abstract fun onButtonReleased()
Callback triggered when receiving an ACTION_UP event.
Link copied to clipboard
abstract fun onCustomAccessoryPressed()
Callback triggered when receiving a PTT ACTION DOWN event.
Link copied to clipboard
abstract fun onCustomAccessoryReleased()
Callback triggered when receiving a PTT ACTION UP event.
Link copied to clipboard
abstract fun onSOSButtonPressed()
Callback triggered when receiving an SOS ACTION_DOWN event.
Link copied to clipboard
abstract fun onSOSButtonReleased()
Callback triggered when receiving an SOS ACTION_UP event.
Link copied to clipboard
abstract fun onSwitchToNextChannel()
Callback triggered when receiving a Switch to next channel event.
Link copied to clipboard
abstract fun onSwitchToPreviousChannel()
Callback triggered when receiving a Switch to previous channel event.
Link copied to clipboard
abstract fun shouldHandleActions(): Boolean
Called every time receiving an event to check if we should handle event.