消息:增加ios链接时的未读消息屏蔽
authorCaisking <3449750381@qq.com>
Wed, 9 Oct 2024 09:38:54 +0000 (17:38 +0800)
committerCaisking <3449750381@qq.com>
Wed, 9 Oct 2024 09:38:54 +0000 (17:38 +0800)
code/sdk/application/wearable/service/ble_service/bleservice/bleANCS.c

index 1a5afdb..deabc5e 100644 (file)
@@ -288,10 +288,11 @@ static void ble_ancs_client_notify_source_cbk(uint8_t client_id, uint16_t conn_i
       
         uint32_t creationTime=0;
         int ret = uapi_get_timestampe_ss(&creationTime);
-        //当前时间戳减去订阅通知时间戳3s以上的通知,才要求数据(过滤ios将所有未查看消息发过来)
-        //if(creationTime-subscribe_notify_creationTime>5)
-        ble_ancs_client_at_cmd_get_notify_att(conn_id, notify_src->notification_uid);
-       // 
+        //当前时间戳减去订阅通知时间戳10s以上的通知,才要求数据(过滤ios将所有未查看消息发过来)
+        if(creationTime-subscribe_notify_creationTime>10)
+        {
+            ble_ancs_client_at_cmd_get_notify_att(conn_id, notify_src->notification_uid);
+        }
 
     } else {
         printf("[ANCSClientNotifySRCCBK]conn_id:%d status:0x%x.\r\n",