[680][device]升级硬件服务SDK,添加渠道配置

This commit is contained in:
xinfengkun
2024-11-27 10:30:20 +08:00
parent eced61bb52
commit ee993243cd
3 changed files with 9 additions and 4 deletions

View File

@@ -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",

View File

@@ -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
)
}
}

View File

@@ -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() {