Book Image

Getting Started with UDOO

By : Maurizio Caporali, Emanuele Palazzetti
Book Image

Getting Started with UDOO

By: Maurizio Caporali, Emanuele Palazzetti

Overview of this book

Table of Contents (16 chapters)
Getting Started with UDOO
About the Author
About the Reviewers

Android for data visualization

Now that our physical application has a fully working circuit to read our heart rate through an unconventional use of a light sensor, we should complete the prototype with an Android application. From the Android Studio, start a new Android project called HeartMonitor with Android API 19. During the bootstrap process, choose a Blank Activity named Monitor.

We start writing the application from the user interface, and we have to think and design the activity layout. For the purpose of this application, we write a simple layout with a title and a text component that we will update every time Android receives a heartbeat estimation from the sketch. This layout could be achieved through the following steps:

  1. In the styles.xml file under res/values/,add these color declarations and replace the standard theme:

    <color name="sulu">#CBE86B</color>
    <color name="bright_red">#A30006</color>
    <style name="AppTheme" parent="Theme.AppCompat">