Android users rejoice! How to easily set up Amazon Sidewalk
What's the story
Amazon Sidewalk is a shared network that helps your devices work better at home and in your community.
Setting it up on your Android device requires you to integrate Login with Amazon, add the Sidewalk SDK, and tweak some privacy settings.
This tutorial takes you step by step through the process, ensuring everything goes smoothly.
Step 1: LWA integration
Integrating Login with Amazon
First, you need to implement Login with Amazon in your Android app.
Go to the Amazon Developer Console to create a security profile and get an Android API key. Don't forget to add a Consent Privacy Notice URL.
Next, download and integrate the LWA SDK into your project. Be careful to avoid unnecessary steps if you already have an existing project in Android Studio.
Step 2: SDK setup
Adding Sidewalk SDK
Then, to integrate the Amazon Sidewalk Mobile Android SDK into your app, first make sure your project-level Gradle file includes the `mavenCentral()` repository configuration.
In your app-level Gradle file, add the dependency for the Sidewalk SDK as demonstrated in the code snippet below.
Once you've added this dependency, simply sync your project to continue.
Step 3: Permissions and registration
Requesting permissions and device registration
Before invoking Amazon Sidewalk APIs, ensure that you have obtained the required permissions from users, particularly location permissions for devices running Android 11 or earlier.
Implement SidewalkAuthProvider to supply user access tokens, and utilize APIs such as scan() and registerDevice() to scan for devices and register them to the network.
Privacy management
Managing privacy settings
To opt out of Amazon Sidewalk or manage its privacy settings on Android, start by opening the Alexa app.
Go to "More" > "Settings" > "Account Settings" > "Amazon Sidewalk." Here, you can turn off Sidewalk completely or just the Community Finding feature.
Also, under "Alexa Privacy," you can adjust settings like how long your voice recordings are saved or whether you want to help improve Alexa's features.