先生,我正在尝试使用firebase云消息进行聊天应用,并坚持解析来自XMPP服务器的响应。这是我得到的回复:
jabber:clientXMPPStanza Object ( [xml:XMPPStanza:private] => JAXLXml Object ( [name] => message [ns] => jabber:client [attrs] => Array ( [type] => normal ) [text] => [childrens] => Array ( [0] => JAXLXml Object ( [name] => gcm [ns] => google:mobile:data [attrs] => Array ( ) [text] => {"message_type":"ack","from":"REGID","message_id":"123"} [childrens] => Array ( ) [parent] => JAXLXml Object *RECURSION* [rover] => JAXLXml Object *RECURSION* ) ) [parent] => [rover] => JAXLXml Object *RECURSION* ) ) jabber:clientXMPPStanza Object ( [xml:XMPPStanza:private] => JAXLXml Object ( [name] => message [ns] => jabber:client [attrs] => Array ( [to] => <SENDERID>@gcm.googleapis.com [from] => devices@gcm.googleapis.com [type] => normal ) [text] => [childrens] => Array ( [0] => JAXLXml Object ( [name] => gcm [ns] => google:mobile:data [attrs] => Array ( ) [text] => {"data":{"my_action":"SAY_HELLO","my_message":"Hello World"},"time_to_live":0,"from":"REGID","message_id":"20","category":"package name"} [childrens] => Array ( ) [parent] => JAXLXml Object *RECURSION* [rover] => JAXLXml Object *RECURSION* ) ) [parent] => [rover] => JAXLXml Object *RECURSION* ) )
我已经阅读了所有jaxl文档,但找不到任何健康的东西。请提示任何方式获取消息和REGID.Thanks提前。