public abstract static class Device.DeviceListener
extends java.lang.Object
Device
object. Notifications indicate system status and user interaction related events.Constructor and Description |
---|
DeviceListener() |
Modifier and Type | Method and Description |
---|---|
boolean |
isEnabled()
Returns if this listener is enabled.
|
void |
onDebugMessage(java.lang.String type,
java.lang.String args)
Called when the device receive messages that fall under the
Device.M_DEBUG category. |
void |
onDeviceFound()
Called when the bluetooth device is connected.
|
void |
onDeviceLost()
Called if the bluetooth device connection is lost or when the device is not connected.
|
void |
onErrorMessage(java.lang.String msg)
Called when the device receive messages that fall under the
Device.M_ERROR category. |
void |
onGestureReceived(java.lang.String type,
java.lang.String args)
Called when the device receive messages that fall under the
Device.M_GESTURE category. |
void |
onSystemMessage(java.lang.String type,
java.lang.String args)
Called when the device receive messages that fall under the
Device.M_SYSTEM category. |
void |
setEnabled(boolean enabled)
Enables or disables this listener.
|
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- If true this listener is enabled.public void onSystemMessage(java.lang.String type, java.lang.String args)
Device.M_SYSTEM
category.type
- Type of the message.args
- Message arguments.public void onErrorMessage(java.lang.String msg)
Device.M_ERROR
category.msg
- The error message.public void onDebugMessage(java.lang.String type, java.lang.String args)
Device.M_DEBUG
category.type
- Type of the message.args
- Message arguments.public void onGestureReceived(java.lang.String type, java.lang.String args)
Device.M_GESTURE
category.type
- Type of the message.args
- Message arguments.public void onDeviceFound()
public void onDeviceLost()