Explanation
Even in this section is readily boring to write about
According to learn as long as I provide a route considered one of earnest study over, this section will be very simple
With the foundation of the first two, this section do we let things Android connection Ali cloud platform
Using the code of this section https://www.cnblogs.com/yangfengwu/p/11883204.html
Directly serving it, test the connection
MQTT connection information according to their fill
Look at information about printing
Things to Ali cloud platform point of view it
Then look at communication
This section is too simple, subscriptions to the publication to the topic we specified data format also specifies how fat
Accordance with the provisions set on it
This section only to pave the way for the next section, written ...
Android subscribe topics
I just use a timer-controlled continuous subscription,
Mainly to prevent, MQTT not connected to it, you go subscription.
Android announced
Above do, as long as the data is received
则发送 "{\"method\":\"thing.event.property.post\",\"id\":\"1111\",\"params\":{\"temp\":25,\"humi\":55},\"version\":\"1.0.0\"}"
test
After you modify the above, run to the phone to install
Second, to the mobile phone APP subscribed threads Send Message
2.1 Click and then point to debug
2.2 jump to a debugging function, method select Settings, then click the Send command
Receiving the data 2.3APP
2.4 APP after receiving the data will return the data
View the running state
prompt
Ming did not know if you know Ali cloud platform
These are Ali goes to something we default
Click on the Send command
发送的主题就是 /sys/a1m7er1nJbQ/Mqtt/thing/service/property/set
消息呢就是 {"method":"thing.service.property.set","id":"129489823","params":{"LightStatus":0},"version":"1.0.0"}
{"LightStatus":0}就是
其它乱七八糟的...阿里云自己给添加的.
管他呢!我只要知道如何通信如何使用就可以了
其它的肯定是为了预防后期实现什么功能搭配的数据而已,
现在用不到就不必管它,管它也没用,人家自动添加的....