@@ -10,6 +10,7 @@ import com.tencent.iot.explorer.link.core.auth.callback.MyCallback
1010import com.tencent.iot.explorer.link.core.auth.entity.ControlPanel
1111import com.tencent.iot.explorer.link.core.auth.entity.DeviceEntity
1212import com.tencent.iot.explorer.link.core.auth.entity.RoomEntity
13+ import com.tencent.iot.explorer.link.core.auth.message.MessageConst
1314import com.tencent.iot.explorer.link.core.auth.message.MessageConst.TRTC_AUDIO_CALL_STATUS
1415import com.tencent.iot.explorer.link.core.auth.message.MessageConst.TRTC_VIDEO_CALL_STATUS
1516import com.tencent.iot.explorer.link.core.auth.message.payload.Payload
@@ -29,6 +30,10 @@ import com.tencent.iot.explorer.link.core.demo.popup.EditPopupWindow
2930import com.tencent.iot.explorer.link.core.demo.popup.EnumPopupWindow
3031import com.tencent.iot.explorer.link.core.demo.popup.NumberPopupWindow
3132import com.tencent.iot.explorer.link.core.demo.view.MyDivider
33+ import com.tencent.iot.explorer.trtc.model.RoomKey
34+ import com.tencent.iot.explorer.trtc.model.TRTCUIManager
35+ import com.tencent.iot.explorer.trtc.ui.audiocall.TRTCAudioCallActivity
36+ import com.tencent.iot.explorer.trtc.ui.videocall.TRTCVideoCallActivity
3237import kotlinx.android.synthetic.main.activity_control_panel.*
3338import kotlinx.android.synthetic.main.menu_back_layout.*
3439
@@ -320,6 +325,18 @@ class ControlPanelActivity : BaseActivity(), ControlPanelCallback, ActivePushCal
320325 * 显示枚举弹框
321326 */
322327 fun showEnumPopup (entity : ControlPanel ) {
328+ // 特殊处理,当设备为trtc设备时。虽然call_status是枚举类型,但产品要求不弹弹窗,点击即拨打语音或视频通话。
329+ if (entity.id == MessageConst .TRTC_AUDIO_CALL_STATUS ) {
330+ controlDevice(entity.id, " 1" )
331+ TRTCUIManager .getInstance().isCalling = true
332+ TRTCAudioCallActivity .startCallSomeone(this , RoomKey (), App .data.callingDeviceId)
333+ return
334+ } else if (entity.id == MessageConst .TRTC_VIDEO_CALL_STATUS ) {
335+ controlDevice(entity.id, " 1" )
336+ TRTCUIManager .getInstance().isCalling = true
337+ TRTCVideoCallActivity .startCallSomeone(this , RoomKey (), App .data.callingDeviceId)
338+ return
339+ }
323340 if (enumPopup == null ) {
324341 enumPopup = EnumPopupWindow (this )
325342 }
0 commit comments