Skip to content

Instantly share code, notes, and snippets.

@Xiryl
Created August 12, 2021 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xiryl/72bab4598f53ca99066c8f6480c80e54 to your computer and use it in GitHub Desktop.
Save Xiryl/72bab4598f53ca99066c8f6480c80e54 to your computer and use it in GitHub Desktop.
BluetoothSDK-Interface
interface IBluetoothSDKListener {
/**
* from action BluetoothUtils.ACTION_DISCOVERY_STARTED
*/
fun onDiscoveryStarted()
/**
* from action BluetoothUtils.ACTION_DISCOVERY_STOPPED
*/
fun onDiscoveryStopped()
/**
* from action BluetoothUtils.ACTION_DEVICE_FOUND
*/
fun onDeviceDiscovered(device: BluetoothDevice?)
/**
* from action BluetoothUtils.ACTION_DEVICE_CONNECTED
*/
fun onDeviceConnected(device: BluetoothDevice?)
/**
* from action BluetoothUtils.ACTION_MESSAGE_RECEIVED
*/
fun onMessageReceived(device: BluetoothDevice?, message: String?)
/**
* from action BluetoothUtils.ACTION_MESSAGE_SENT
*/
fun onMessageSent(device: BluetoothDevice?)
/**
* from action BluetoothUtils.ACTION_CONNECTION_ERROR
*/
fun onError(message: String?)
/**
* from action BluetoothUtils.ACTION_DEVICE_DISCONNECTED
*/
fun onDeviceDisconnected()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment