mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 3107|reply: 4
打印 prevThread nextThread

CU SDK 发送消息 字段丢失

[copyURL]

18

主题

81

帖子

258

积分

midMem

Rank: 3Rank: 3

积分
258
jumpTo
owner
poston 2019-7-10 14:47 | authorOnly 回帖奖励 |倒序浏览 |阅读模式
CU SDK 发送位置消息的时候,添加字段
  1. imMsgs.im_Msg[0].szTextMsg = address;
copycode



发送数据
  1. {"iCount":1,"im_Msg":[{"iMsgID":0,"iSourceIndex":0,"iType":3,"stGPSData":{"bAntennaState":0,"bOrientationState":0,"iAngle":0,"iHeight":0,"iLatitude":312055880,"iLongitude":1214701735,"iSatelliteSignal":0,"iSpeed":0,"iStarCount":0},"szTextMsg":"之俊大厦-2座附近31米"}]}
copycode
另外一段接受
  1. {"iCount":1,"im_Msg":[{"iMsgID":14050,"iSourceIndex":7342,"iType":3,"stGPSData":{"bAntennaState":0,"bOrientationState":0,"iAngle":0,"iHeight":0,"iLatitude":312055880,"iLongitude":1214701735,"iSatelliteSignal":0,"iSpeed":0,"iStarCount":0,"stTime":{"iDay":0,"iHour":0,"iMinute":0,"iMonth":0,"iSecond":0,"iYear":0}},"stSendTime":{"iDay":10,"iHour":6,"iMinute":43,"iMonth":7,"iSecond":47,"iYear":2019},"szSourceID":"UA_29973668","szTargetID":"CONF_5CECE1A6"}]}
copycode
丢失了 szTextMsg字段 ,请问怎么解决

reply

使用道具 report

2

主题

414

帖子

1188

积分

vipMem

Rank: 6Rank: 6

积分
1188
sofa
poston 2019-7-10 14:51 | authorOnly
发送GPS消息时,只能填写GPS数据,发送文本消息时,textmsg才生效
reply agree Against

使用道具 report

13

主题

373

帖子

2037

积分

vipMem

Rank: 6Rank: 6

积分
2037
bench
poston 2019-7-10 14:51 | authorOnly
哈哈,兄弟,代码开发,要自己动手丰衣足食。我们研发超忙。
reply agree Against

使用道具 report

18

主题

81

帖子

258

积分

midMem

Rank: 3Rank: 3

积分
258
ground
 Owner| poston 2019-7-10 14:57 | authorOnly
hardfire post on2019-7-10 14:51
哈哈,兄弟,代码开发,要自己动手丰衣足食。我们研发超忙。

为什么会丢呢。。就搞不懂啊兄弟
reply agree Against

使用道具 report

2

主题

414

帖子

1188

积分

vipMem

Rank: 6Rank: 6

积分
1188
5#
poston 2019-7-10 15:21 | authorOnly
LJJ post on2019-7-10 14:57
为什么会丢呢。。就搞不懂啊兄弟

这不是丢,是你的消息类型填写错了,一个消息只能传输一种类型的负载,是消息类型决定了哪种负载有效,位置消息类型对应GPS负载有效,文本消息类型,对应文本负载有效。
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-12-25 09:54 , Processed in 0.053708 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList