Professional Android Sensor Programming
Год: 2012 (June)
Автор: Greg Milette, Adam Stroud
Издательство: Wrox
ISBN: 978-1-1181-8348-9
Серия: Programmer to Programmer
Язык: Английский
Формат: PDF/EPUB
Качество: Изначально компьютерное (eBook)
Интерактивное оглавление: Нет
Количество страниц: 556
Описание: 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
Оглавление
Part I: Location Services
Chapter 1. Introducing the Android Location Service
Methods Used to Determine Location
Summary
Chapter 2. Determining a Device’s Current Location
Know Your Tools
Setting up the Android Manifest
Determining the Appropriate Location Provider
Receiving Location Updates
Implementing the Example App
Summary
Chapter 3. Tracking Device Movement
Collecting Location Data
Viewing the Tracking Data
Filtering Location Data
Continuous Location Tracking and Battery Life
Summary
Chapter 4. Proximity Alerts
App Structure
Proximity Alert Limitations
More Effi cient Proximity Alert
Summary
Part II: Inferring Information from Physical Sensors
Chapter 5. Overview of Physical Sensors
Definitions
Android Sensor API
Sensing the Environment
Sensing Device Orientation and Movement
Summary
Chapter 6. Errors and Sensor Signal Processing
Definitions
Filters
A Better Determination of Orientation by Using Sensor Fusion
Summary
Chapter 7. Determining Device Orientation
Previewing the Example App
Determining Device Orientation
NorthFinder
Summary
Chapter 8. Detecting Movement
Acceleration Data 148
Implementation
Summary
Chapter 9. Sensing the Environment
Barometer vs. GPS for Altitude Data
Example App Overview
Summary
Chapter 10. Android Open Accessory
A Short History of AOA
The Android Development Kit (ADK)
AOA Sensors versus Native Device Sensors
AOA Beyond Sensors
AOA Limitations
AOA and Sensing Temperature
Taking an Android Accessory to the Consumer Market
Summary
Part III: Sensing the Augment, Parttern-Rich External World
Chapter 11. Near Field Communication (NFC)
What Is RFID?
What Is NFC?
Building an Inventory Tracking System
Android APIs
Future Considerations
Go Forth and NFC!
Summary
Chapter 12. Using the Camera
Using the Camera Activity
Creating a Simple Barcode Reader
Summary
Chapter 13. Image-Processing Techniques
The Structure of Image-Processing Programs
Detecting Faces
Image-Processing Resources
Summary
Chapter 14. Using the Microphone
Introducing the Android Clapper
Using MediaRecorder to Analyze Maximum Amplitude
Implementing a Clapper
Analyzing Raw Audio
Using Loud Noise Detection
Using Consistent Frequency Detection
Summary
Part IV: Speaking to Android
Chapter 15. Designing a Speech-Enabled App
Know Your Tools
User Interface Screen Flow
Voice Action Types
Voice User Interface (VUI) Design
Testing Your Design
Summary
References
Chapter 16. Using Speech Recognition and Text-To-Speech APIs
Text-To-Speech
Speech Recognition
Summary
Chapter 17. Matching What Was Said
Parts of a Voice Command
Word Spotting
Matching Command Words in Persistent Storage
Multi-part Commands
Using a Grammar
Summary
Chapter 18. Executing Voice Actions
Food Dialogue VUI Design
Defi ning and Executing Voice Actions
Executing VoiceActionCommands
Implementing an AlertDialog for VoiceActions
Implementing Multi-Turn Voice Actions
Making a Best Guess
Responding When Recognition Fails
Summary
Chapter 19. Implementing Speech Activation
Implementing Speech Activation
Implementing Persistent Speech Activation
Summary