Seeing your comments and questions. I had the similar issues when working with AndroidPubSubWebSocket. Make sure you are giving appropriate permission to publish and subscribe to the thing as given in the Github repo instruction by AWS. Assuming that has been done.
- The sample provided in the Github AndroidPubSuB is only for the unauthenticated user. For authenticated user (Here Facebook) few things have to be added both on AWS side and Android Side
Map<String, String> logins = new HashMap<String, String>();
The above code is necessary as it is used by AwsCredentialProvider for authentication of the user for publishing and connecting to the thing.
After you are done with above head here. Follow the answer by Caleb and do the exact steps.
After this, you are good to go.
- For Unauthenticated user create a pool for users and region in AWS. Get the thing end point. Make the appropriate changes.
To get the changes to the shadow type the following in the sample android(WebSocketAwsOubSub) edit box $aws/things/thing_name/shadow/update/accepted
And to publish the data to the shadow type $aws/things/thing_name/shadow/update