Alexa – Device Finder is a combination of an Alexa skill with an Android companion app.
It is a skill used to locate any Android device by asking Alexa where it is. The Android app will receive a notification to play a sound at maximum volume
High level overview:
- Android app connects with AWS Lambda REST API for account linking. All information is stored in DynamoDB
- User asks Alexa to trigger the skill, which is also hosted as an AWS Lambda function
- Device rings. Bring bring.
There are two parts to the application:
- The Android application, written in Java
- The .NET Core solution, which is broken down into two additional parts
- The authentication API between the Android device and the DynamoDB database, which stores the user's Amazon ID + Device ID for notifications
- The Alexa skill itself that the user will interact with
- The user will login to the Android app via their Amazon account to connect with their Amazon account. This component uses the Login With Amazon library for Android
- The user asks Alexa to begin set up of the Device Finder skill, which is hosted as an AWS Lambda function
- Alexa provides a 6-digit one time passcode that the user will enter in the Android companion app. This is used to confirm the link between the devices. The expiration of this code is ~3-5 minutes
- The user enters a device name, which can later be used to identify specific devices if they choose to link several. All devices can be managed from any device
- All user information is not personal information. None of it can be used to identify a user. All information resides in DynamoDB
- The user asks Alexa to find a phone (e.g., "Alexa where's James's phone?")
- This triggers the AWS Lambda function which queries the database and sends a Firebase Cloud Message (FCM) to the user's phone
- The Android app receives the notification and plays a sound at max volume
Q: Why are all the projects in one repo? Doesn't it make sense to split them into multiple with a meta-repo?
A: This is primarily due to being able to see when bugs were introduced by having a single "source of truth." It helps with tracking when features are implemented. Additionally, the amount of code in each project is not significant enough to justify splitting them all out. However, I recognize the desire for multiple repos because the projects are intended to be loosely-coupled. This can be changed in the future if the project becomes too big.
Q: Where are the rest of the projects?
A: You caught me. They are currently in a private repo until they have been cleaned up and ready for public development. I am working on setting those up ASARP (as soon as reasonably possible), but I want them to be as clean as possible before they go public.
(I haven't received any other questions so I'll add something here when I discover something that should be here)
First, select an issue you'd like to work on and comment on it. If you have any questions or clarifications needed, you can discuss it there with the team. For extensive conversations, you may need to send an email to [email protected]. Generally, the process will be to simply open a PR for any changes. As for coding standards, we are strictly adhering to Microsoft's standards for the C# projects and Google's standards for the Android project.
- Install Android Studio
- Download the Login With Amazon Android SDK
- Place
login-with-amazon-sdk.jar
into the directory\AndroidApp\app\libs
- Build the app
- Sign your version of the app with the instructions here
- Follow the instructions here to create a new security profile for use with Login With Amazon
- Navigate to the directory
\AndroidApp\app\src\main\assets
and create a file calledapi_key.txt
. If that directory does not exist, then you must create it - Under the Android/Kindle settings of your security profile, copy and paste the API key value directly into
api_key.txt
. Note that there cannot be spaces before/after the key. Only copy and paste the raw text given - Build and run the app
- If this does not work, please open an issue with the documentation tag so we can identify what problems may arise
- Install Visual Studio 2019
- Install the AWS SDK for Visual Studio
- Install Postman to make REST API calls (or your preferred client)
- Build the solution
- To run the Alexa skill, you will need to use the mock Lambda test tool included with the AWS toolkit
- To run the Device API, you can use the IIS Express profile to launch the browser. You can test requests with the Postman collection provided