IDevice Event Callback
IDeviceEventCallback
Description :
This interface represent the API for all event related to Device event(Hardware button).
Example of use :
- Implementation :
IDeviceEventCallback mDeviceEventCallback = new IDeviceEventCallback() { public boolean shouldHandleActions() { //code ... } public void onPttButtonPressed() { //code ... } public void onPttButtonReleased() { //code ... } public void onSosButtonPressed() { //code ... } public void onSosButtonReleased() { //code ... } public void onPressNextSwitch() { //code ... } public void onPressPreviousSwitch() { //code ... } }Content copied to clipboard - Registration:
to register your callback you must call :STWSupportedDeviceManager.getInstance().registerForSupportedDevicesCallback(context, supportedHardwareList, mBleEventCallBack);Content copied to clipboardContent copied to clipboard - Unregister:
to unregister your callback you must call :STWSupportedDeviceManager.getInstance().unregisterForSupportedDevices(context);Content copied to clipboardContent copied to clipboard
Functions
Link copied to clipboard
Callback triggered when switch next with device button
Link copied to clipboard
Callback triggered when switch previous with device button
Link copied to clipboard
Callback triggered when click (action down) on PTT device button
Link copied to clipboard
Callback triggered when click (action up) on PTT device button
Link copied to clipboard
Callback triggered when click (action down) on SOS device button
Link copied to clipboard
Callback triggered when click (action up) on SOS device button
Link copied to clipboard
Called every time receiving an event to check if we should handle event.