This application collects health information in real-time and sends it over to AWS to analyze for abnormalities.
This app is capable of collecting health information such as heart rate and the location of the user. It has a thread that always runs in the foreground which sends the health data over to AWS servers. You can adjust the sampling rate for both location and heart rate to improve battery life.
You should familiarize yourself with Cloudformation, IoTCore before following the instructions below.
Use the cloudformation template in the “Cloudformation” folder to setup a “Cloudformation Stack”. Make sure you are in the correct region as this will affect the geographical location of where the workload is going to run. The parameters to the stack are the Kinesis Data Stream ARN, the logical name of the Stream and the name of the topic your wearable is subscribed to. Use the stream to which you want to redirect the output of the wearable.
Use the output of the stack to setup the Android Studio project. Once the stack is set up it will output : IdentityPoolId, IoTPolicyName, Region. Change the constants inside AWSViewModel class to the generated values. You can lookup IOTEndpoint address in IoTCore in AWS console (Go to IoTCore => Settings).
Launching the application
Next step is to run the application on a physical device or emulator. Since heart rate sensor is not available in the emulator, it will default to sending the light sensor data (don’t be surprised when you see 0.0 for heart rate in the emulator). On a physical device it should work as expected.
This project is distributed under MIT license.