This sample requires Cognito to authorize to AWS IoT in order to access device shadows. Use Amazon Cognito to create a new identity pool:
- Head to Cognito and click on 'Manage Federated Identities'
- Click 'Create New Identity Pool'
- Give your Identity Pool a name and click 'Enable access to unauthenticated identities'
- Click 'Create Pool'
- Click 'Allow' to access your user Roles and click 'Allow' again to use the default Auth and Unauth roles.
- Go back to your Identity Pool and click 'Sample Code'
- Take note of your Identity Pool Id and Region
- Using the AWS CLI type the command 'aws iot describe-endpoint'
- Import the AWS-IoT-Neopixel-Android project into Android Studio
- Edit the /utils/Constants.java file and fill in your Consumer Specific Endpoint, Identity Pool Id, and Region
- Edit the /res/strings.xml and create a new entry for each device in your AWS IoT console