Skip to content

Commit e4e3ae5

Browse files
committed
优化版本号匹配UI提示
Change-Id: I9d1f1fd037682b1a91f7b383126898b9cb1f56ac (cherry picked from commit fd6a6f4)
1 parent f679f5b commit e4e3ae5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

sdkdemo/src/main/java/com/tencent/iot/explorer/link/demo/video/preview/VideoPreviewActivity.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@ class VideoPreviewActivity : VideoBaseActivity(), EventView, TextureView.Surface
141141
App.data.accessInfo!!.productId, presenter.getDeviceName(), "")
142142
if (started != 0) {
143143
launch(Dispatchers.Main) {
144-
var errInfo = getString(R.string.error_with_code, id, started.toString())
144+
var errInfo = ""
145+
if (started.toString() == "-1007") {
146+
errInfo = getString(R.string.xp2p_err_version)
147+
} else {
148+
errInfo = getString(R.string.error_with_code, id, started.toString())
149+
}
145150
Toast.makeText(this@VideoPreviewActivity, errInfo, Toast.LENGTH_SHORT).show()
146151
}
147152
return@Runnable

sdkdemo/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
<string name="disconnected_and_reconnecting">%s 通道断开,正在重连</string>
9898
<string name="connected">%s 通道建立成功</string>
9999
<string name="error_with_code">%s 连接错误码 %s,通道断开</string>
100+
<string name="xp2p_err_version">APP SDK 版本与设备端 SDK 版本号不匹配,版本号需前两位保持一致</string>
100101
<string name="command_with_error">执行信令 %s 不成功</string>
101102
<string name="loading">加载中</string>
102103

0 commit comments

Comments
 (0)