public class TXZWheelControlManager
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static interface |
TXZWheelControlManager.OnConnectionStatusLinstener
方控蓝牙连接状态
|
static interface |
TXZWheelControlManager.OnTXZGlobalWheelControlListener
方控全局事件的回调,全局事件每个事件只能注册一次。
|
static interface |
TXZWheelControlManager.OnTXZWheelControlListener
普通方控事件的回调
|
限定符和类型 | 方法和说明 |
---|---|
void |
enableWheelControl(boolean enable)
启用或禁用方控功能
|
static TXZWheelControlManager |
getInstance() |
boolean |
isWheelControlConnected()
当前方控连接状态需要先注册状态监听
|
byte[] |
notifyCallback(java.lang.String command,
byte[] data)
处理core 发送的消息回调
|
boolean |
regGlobalEvent(int eventId) |
void |
registerWheelControlListener(TXZWheelControlManager.OnTXZWheelControlListener listener)
注册普通方控事件监听,不使用时需要反注册。
|
void |
removeGlobalWheelControlListener()
反注册全局事件监听
|
void |
scanLEDevice(boolean enable)
开始或停止扫描方控设备,不需要主动调用,启动方控自动连接方控
|
void |
setConnectionStatusLinstener(TXZWheelControlManager.OnConnectionStatusLinstener listener) |
boolean |
setGlobalWheelControlListener(TXZWheelControlManager.OnTXZGlobalWheelControlListener listener)
全局事件只能注册一次,多次注册无效,在调用之前需要先调用
regGlobalEvent(int) |
void |
unregisterWheelControlListener(TXZWheelControlManager.OnTXZWheelControlListener listener)
反注册普通方控事件监听
|
public static TXZWheelControlManager getInstance()
public byte[] notifyCallback(java.lang.String command, byte[] data)
public boolean isWheelControlConnected()
public void enableWheelControl(boolean enable)
public void scanLEDevice(boolean enable)
public void setConnectionStatusLinstener(TXZWheelControlManager.OnConnectionStatusLinstener listener)
public void registerWheelControlListener(TXZWheelControlManager.OnTXZWheelControlListener listener)
listener
- unregisterWheelControlListener(OnTXZWheelControlListener)
public void unregisterWheelControlListener(TXZWheelControlManager.OnTXZWheelControlListener listener)
listener
- registerWheelControlListener(OnTXZWheelControlListener)
public boolean regGlobalEvent(int eventId)
eventId
- TXZWheelControlEvent.VOL_KEY_CLICKED_EVENTID
,
TXZWheelControlEvent.VOL_KEY_LONG_CLICKED_EVENTID
,
TXZWheelControlEvent.VOL_KEY_UP_EVENTID
,
TXZWheelControlEvent.VOL_KEY_DOWN_EVENTID
,
TXZWheelControlEvent.HOME_KEY_CLICKED_EVENTID
,
TXZWheelControlEvent.HOME_KEY_LONG_CLICKED_EVENTID
,
TXZWheelControlEvent.HOME_KEY_UP_EVENTID
,
TXZWheelControlEvent.HOME_KEY_DOWN_EVENTID
,
TXZWheelControlEvent.BACK_KEY_CLICKED_EVENTID
,
TXZWheelControlEvent.BACK_KEY_LONG_CLICKED_EVENTID
,
TXZWheelControlEvent.BACK_KEY_UP_EVENTID
,
TXZWheelControlEvent.BACK_KEY_DOWN_EVENTID
public boolean setGlobalWheelControlListener(TXZWheelControlManager.OnTXZGlobalWheelControlListener listener)
regGlobalEvent(int)
listener
- public void removeGlobalWheelControlListener()