You are previewing Professional Android Sensor Programming.
O'Reilly logo
Professional Android Sensor Programming

Book Description

Learn to build human-interactive Android apps, starting with device sensors

This book shows Android developers how to exploit the rich set of device sensors—locational, physical (temperature, pressure, light, acceleration, etc.), cameras, microphones, and speech recognition—in order to build fully human-interactive Android applications. Whether providing hands-free directions or checking your blood pressure, Professional Android Sensor Programming shows how to turn possibility into reality.

The authors provide techniques that bridge the gap between accessing sensors and putting them to meaningful use in real-world situations. They not only show you how to use the sensor related APIs effectively, they also describe how to use supporting Android OS components to build complete systems. Along the way, they provide solutions to problems that commonly occur when using Android's sensors, with tested, real-world examples. Ultimately, this invaluable resource provides in-depth, runnable code examples that you can then adapt for your own applications.

  • Shows experienced Android developers how to exploit the rich set of Android smartphone sensors to build human-interactive Android apps

  • Explores Android locational and physical sensors (including temperature, pressure, light, acceleration, etc.), as well as cameras, microphones, and speech recognition

  • Helps programmers use the Android sensor APIs, use Android OS components to build complete systems, and solve common problems

  • Includes detailed, functional code that you can adapt and use for your own applications

  • Shows you how to successfully implement real-world solutions using each class of sensors for determining location, interpreting physical sensors, handling images and audio, and recognizing and acting on speech

Learn how to write programs for this fascinating aspect of mobile app development with Professional Android Sensor Programming.

Table of Contents

  1. Cover
  2. Introduction
  3. Part I: Location Services
    1. Chapter 1: Introducing the Android Location Service
      1. Methods Used to Determine Location
      2. Summary
    2. Chapter 2: Determining a Device's Current Location
      1. Know Your Tools
      2. Setting up the Android Manifest
      3. Determining the Appropriate Location Provider
      4. Receiving Location Updates
      5. Implementing the Example App
      6. Summary
    3. Chapter 3: Tracking Device Movement
      1. Collecting Location Data
      2. Viewing the Tracking Data
      3. Filtering Location Data
      4. Continuous Location Tracking and Battery Life
      5. Summary
    4. Chapter 4: Proximity Alerts
      1. App Structure
      2. Proximity Alert Limitations
      3. More Efficient Proximity Alert
      4. Summary
  4. Part II: Inferring Information from Physical Sensors
    1. Chapter 5: Overview of Physical Sensors
      1. Definitions
      2. Android Sensor API
      3. Sensing the Environment
      4. Sensing Device Orientation and Movement
      5. Summary
    2. Chapter 6: Errors and Sensor Signal Processing
      1. Definitions
      2. Filters
      3. A Better Determination of Orientation by Using Sensor Fusion
      4. Summary
    3. Chapter 7: Determining Device Orientation
      1. Previewing the Example App
      2. Determining Device Orientation
      3. NorthFinder
      4. Summary
    4. Chapter 8: Detecting Movement
      1. Acceleration Data
      2. Implementation
      3. Summary
    5. Chapter 9: Sensing the Environment
      1. Barometer vs. GPS for Altitude Data
      2. Example App Overview.
      3. Summary
    6. Chapter 10: Android Open Accessory
      1. A Short History of AOA
      2. The Android Development Kit (ADK)
      3. AOA Sensors versus Native Device Sensors
      4. AOA Beyond Sensors
      5. AOA Limitations
      6. AOA and Sensing Temperature
      7. Taking an Android Accessory to the Consumer Market
      8. Summary
  5. Part III: Sensing the Augmented, Pattern-Rich External World
    1. Chapter 11: Near Field Communication (NFC)
      1. What Is RFID?
      2. What Is NFC?
      3. Building an Inventory Tracking System
      4. Android APIs
      5. Future Considerations
      6. Go Forth and NFC!
      7. Summary
    2. Chapter 12: Using the Camera
      1. Using the Camera Activity
      2. Creating a Simple Barcode Reader
      3. Summary
    3. Chapter 13: Image-Processing Techniques
      1. The Structure of Image-Processing Programs
      2. Detecting Faces
      3. Image-Processing Resources
      4. Summary
    4. Chapter 14: Using the Microphone
      1. Introducing the Android Clapper
      2. Using MediaRecorder to Analyze Maximum Amplitude
      3. Implementing a Clapper
      4. Analyzing Raw Audio
      5. Using Loud Noise Detection
      6. Using Consistent Frequency Detection
      7. Summary
  6. Part IV: Speaking to Android
    1. Chapter 15: Designing a Speech-enabled App
      1. Know Your Tools
      2. User Interface Screen Flow
      3. Voice Action Types
      4. Voice User Interface (VUI) Design
      5. Testing Your Design
      6. Summary
    2. Chapter 16: Using Speech Recognition and Text-To-Speech APIs
      1. Text-To-Speech
      2. Speech Recognition
      3. Summary
    3. Chapter 17: Matching What Was Said
      1. Parts of a Voice Command
      2. Word Spotting
      3. Matching Command Words in Persistent Storage
      4. Multi-part Commands
      5. Using a Grammar
      6. Summary
    4. Chapter 18: Executing Voice Actions
      1. Food Dialogue VUI Design
      2. Defining and Executing Voice Actions
      3. Executing VoiceActionCommands
      4. Implementing an AlertDialog for Voice Actions
      5. Implementing Multi-Turn Voice Actions
      6. Making a Best Guess
      7. Responding When Recognition Fails
      8. Summary
    5. Chapter 19: Implementing Speech Activation
      1. Implementing Speech Activation
      2. Implementing Persistent Speech Activation
      3. Summary
  7. Advertisement