|
@@ -101,6 +101,8 @@ class WdKeepAliveService : AbsWorkService() {
|
|
EventBus.getDefault().register(this)
|
|
EventBus.getDefault().register(this)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ instanceCreated = true
|
|
|
|
+
|
|
//全局调用一次
|
|
//全局调用一次
|
|
Thread {
|
|
Thread {
|
|
Log.d(TAG, "Constants.tcpServer: " + Constants.tcpServer)
|
|
Log.d(TAG, "Constants.tcpServer: " + Constants.tcpServer)
|
|
@@ -108,7 +110,6 @@ class WdKeepAliveService : AbsWorkService() {
|
|
Thread.sleep(3000)
|
|
Thread.sleep(3000)
|
|
}
|
|
}
|
|
TcpClient.getInstance().init(Constants.tcpServer, Constants.tcpPort, Constants.heartBeat)
|
|
TcpClient.getInstance().init(Constants.tcpServer, Constants.tcpPort, Constants.heartBeat)
|
|
- instanceCreated = true
|
|
|
|
}.start()
|
|
}.start()
|
|
|
|
|
|
//播放一个短音频来获取音频焦点,之后才能监听到耳机按键
|
|
//播放一个短音频来获取音频焦点,之后才能监听到耳机按键
|