Encountering questions while using MQTT. 在使用MQTT时遇到问题

,

中文:在使用MQTT的订阅功能时,遇到了一些问题。我无法收到消息。多方求解无效,请问是哪里出了问题?谢谢!



English:I encountered some issues while using MQTT's subscription feature. I am unable to receive the message.Multi party solution is ineffective. May I ask where the problem lies? thank you!


Chinese "班" and "班级" means "class".
Chinese "测试" means "test".
Chinese "新" means "new".
Chinese "通知" means "notice".
Chinese "消息" means "message".
Chinese "收到的" means "received".
My English is not well.Sorry!
(fanyi.baidu.com)
I'm test in WSA.
我在WSA中测试。

connect 方法是异步操作。你需要先执行connect 方法,在他的connectStateChanged 事件用判断是否连接成功。在成功后才能执行Subscribe 操作。换句话说,你这个subscribe 执行的太早了,还没连接呢,你就订阅,肯定订阅失败的。

另外WSA是什么意思

谢谢!
WSA就是Windows下Android子系统啊
还有,你是哪里人?