简体   繁体   English

Android AWS IoT示例不更新阴影

[英]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.

相关问题 如何在 android 应用程序上获取 aws-iot 事物阴影 - How to get aws-iot thing shadow on android app 如何在Android应用程序上获得aws-iot的东西阴影?我为此使用了rest api(由aws创建),但需要了解如何使用rest api添加标头? - How to get aws-iot thing shadow on android app??I Used rest api(created by aws) for this but need to understand how to add headers with rest api? 无法使用适用于Android的AWS开发工具包在AWS IoT中创建事物 - Unable to create a Thing in AWS IoT using AWS sdk for Android 使用Android在AWS IoT服务上发布MQTT消息 - Using Android To Publish MQTT Messages on AWS IoT Services Android 中的 AWS IoT Policy 不适用于自定义主题 - AWS IoT Policyin Android doesnt work with custom topic 使用IAM从Android MQTT客户端登录AWS IoT无法正常工作 - AWS IoT login from android MQTT client using IAM is not working AWS IOT 在 Android 中即时注册证书 - AWS IOT Just-in-Time Registration of Certificate in Android 无法使用Android客户端与AWS IOT MQTT代理连接 - can not connect with aws iot mqtt broker using android client Android 应用程序使用 X.509 证书连接到 AWS IoT - Android app to connect to AWS IoT using X.509 certificate AWS Cognito和Android示例-{“ AppCognitoWebDomain”:“ invalid”} - AWS Cognito and Android example - {“AppCognitoWebDomain”:“invalid”}
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM