[680][device]升级硬件服务SDK,添加渠道配置
This commit is contained in:
@@ -217,7 +217,7 @@ ext {
|
||||
androidautoSize : 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1',
|
||||
|
||||
//========================= 串口设备 ======================
|
||||
serialport : 'com.mogo.support.device.manager:serial_port:2.2.4',
|
||||
serialport : 'com.mogo.support.device.manager:serial_port:2.2.5',
|
||||
|
||||
thread_opt : "com.mogo.thread.opt:lib:10.10.3",
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.datacenter.iot
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.env.ProjectUtils
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.commons.utils.MogoAnalyticUtils
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
@@ -32,7 +33,11 @@ object IotManager : IMoGoCloudListener, IWriteChainLogListener {
|
||||
|
||||
private fun hardwareDeviceBind(sn: String) {
|
||||
if (sn.isNotEmpty()) {
|
||||
DevicesManager.init(AbsMogoApplication.getApp(), sn)
|
||||
DevicesManager.init(
|
||||
AbsMogoApplication.getApp(),
|
||||
sn,
|
||||
ProjectUtils.getProjectType().value
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@ object DevicesManager {
|
||||
ConcurrentHashMap()
|
||||
private var writeChainLogListener: IWriteChainLogListener? = null
|
||||
|
||||
fun init(context: Context, sn: String) {
|
||||
serialPortManager.bindService(context, sn, bindStateChangeListener)
|
||||
fun init(context: Context, sn: String, projectType: String) {
|
||||
serialPortManager.bindService(context, sn, projectType, bindStateChangeListener)
|
||||
}
|
||||
|
||||
fun destroy() {
|
||||
|
||||
Reference in New Issue
Block a user