IBle Event Call Back
IBleEventCallBack
Description :
This interface represent the API for all event related to the BLE(Bluetooth Low Energy), it offers needed callback to handle BLE events.
Example of use :
- Implementation :
IBleEventCallBack mBleEventCallBack = new IBleEventCallBack() { public boolean shouldHandleActions() { // boolean : true : handle any received event // false : abort received event } public void onButtonPressed() { //code ... } public void onButtonReleased() { //code ... } public void onPressPTT1() { //code ... } public void onReleasePTT1() { //code ... } public void onPressPTT2() { //code ... } public void onReleasePTT2() { //code ... } public void onSwitchNext() { //code ... } public void onSwitchPrevious() { //code ... } public void onPressMBF() { //code ... } public void onLongClickMBF() { //code ... } public void onPressSOS() { //code ... } public void onReleaseSOS() { //code ... } public void onPressStopSOS() { //code ... } public void onReleaseStopSOS() { //code ... } }Content copied to clipboard - Registration:
to register your callback you must call :STWBLEManager.getInstance().registerBleEventChanged(mBleEventCallBack);Content copied to clipboardContent copied to clipboard - Unregister:
to unregister your callback you must call :STWBLEManager.getInstance().unregisterBleEventChanged(mBleEventCallBack);Content copied to clipboardContent copied to clipboard
Functions
Link copied to clipboard
Callback triggered when receiving a Long Press MULTI_FUNCTION_BUTTON event.
Link copied to clipboard
Callback triggered when receiving a Press MULTI_FUNCTION_BUTTON event.
Link copied to clipboard
Callback triggered when receiving a PTT Press event.
Link copied to clipboard
Callback triggered when receiving a PTT 1 Press event.
Link copied to clipboard
Callback triggered when receiving a PTT 2 Press event.
Link copied to clipboard
Callback triggered when receiving a Press Sos event.
Link copied to clipboard
Callback triggered when receiving a Press STOP SOS event.
Link copied to clipboard
Callback triggered when receiving a PTT Press event.
Link copied to clipboard
Callback triggered when receiving a PTT 1 Release event.
Link copied to clipboard
Callback triggered when receiving a PTT 1 Release event.
Link copied to clipboard
Callback triggered when receiving a Release Sos event.
Link copied to clipboard
Callback triggered when receiving a Release STOP SOS event.
Link copied to clipboard
Callback triggered when receiving a Switch next event.
Link copied to clipboard
Callback triggered when receiving a Switch previous event.
Link copied to clipboard
Called every time receiving an event to check if we should handle event.