[英]Android AWS IoT example not updating shadow
I have downloaded AWS IoT Android samples from here . 我从这里下载了AWS IoT Android示例。 I successfully run AndroidPubSub example given in above list.
我成功运行了上面列表中给出的AndroidPubSub示例。 I can connect and subscribe.
我可以连接和订阅。 But message which I am publishing is not updating device shadow I have on AWS.
但是我发布的消息并没有更新我在AWS上的设备阴影。 Even when I update shadow on AWS console message not came on android device.
即使我在AWS控制台上更新阴影消息也未在Android设备上发布。 I am missing something very small somewhere or am doing completely wrong?
我错过了一些非常小的东西,或者我做错了什么?
It was my mistake. 这是我的错。 Non of the document about android AWS IoT mentioned about it.
关于android AWS IoT的文件没有提到它。 While publishing message to topic we should mention complete topic string available in AWS console.
在向主题发布消息时,我们应该提及AWS控制台中提供的完整主题字符串。 ie
即
$aws/things/lamp/shadow/update
Now adding complete string as topic I am able to publish message to AWS IoT. 现在添加完整的字符串作为主题我能够将消息发布到AWS IoT。 To receive updates on android device subscribe to /update/accepted.
要在Android设备上接收更新,请订阅/更新/接受。
$aws/things/lamp/shadow/update/accepted
@RamithDR @RamithDR
I was facing the same issue and then have added iot full access policy ,then it starts working. 我面临同样的问题,然后添加了iot完整访问策略,然后它开始工作。
AWSIoTFullAccess AWSIoTFullAccess
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.