Quick SMS Reply (Android)

Example

The watch receives a message notification, click Quick Reply to view the message details, and receive the following notification, The results are subject to notification. Refer to Full process

This command attribute replies to the device and is valid when receiving firmware notification.

override fun listenDeviceNotification(status: IDODeviceNotificationModel) {
 println("listenDeviceNotification $status");
 // Quick SMS reply
   if (status.controlEvt == 580 && status.controlJson != null) { 
   println("status.controlJson: ${status.controlJson}")

   // 1 means a quick reply to an incoming call 
   if (msgItem.msgType == 1) {
     // TODO: Call the android system here to send a quick reply to The third app, and get the reply result
     // val isSuccess = if (reply result) 1 else 0
     var param = IDOFastMsgUpdateParamModel(1,msgItem.msgID, msgItem.msgType, msgItem.msgNotice)
     Cmds.setFastMsgUpdate(param) .send {
     println("setFastMsgUpdate ${it.res?.toJsonString()}")
   }
   }else{
     // Third-party message
     // TODO: Call the android system here to send a quick reply to the third app , and get the reply result
     // val isSuccess = if (reply result) 1 else 0
     var param = IDOFastMsgUpdateParamModel(1,msgItem.msgID, msgItem.msgType, msgItem.msgNotice)
     Cmds.setFastMsgUpdate(param).send { 
     println("setFastMsgUpdate ${it.res?.toJsonString()}")
     }
   }
   }
}
Copyright © 2023-2024 IDO. All rights reserved. all right reserved,powered by Gitbook修改日期: 2024-04-22 17:20:23

results matching ""

    No results matching ""