You are previewing Basic Sensors in iOS.
O'Reilly logo
Basic Sensors in iOS

Book Description

Modern mobile platforms, such as Apple’s iPhone and iPad, come with a growing range of sensors; GPS, accelerometers, magnetometers and gyroscopes. This book guides you through how to make use of these sensors, giving you the necessary tools and experience to develop applications that makes best use of the hardware.

Table of Contents

  1. Special Upgrade Offer
  2. A Note Regarding Supplemental Files
  3. Preface
    1. Who Should Read This Book?
    2. What You Should Already Know?
    3. What Will You Learn?
    4. What’s In This Book?
    5. Conventions Used in This Book
    6. Using Code Examples
    7. Safari® Books Online
    8. How to Contact Us
    9. Acknowledgments
  4. 1. The Hardware
    1. Available Sensor Hardware
    2. Differences Between iPhone and iPad
      1. Device Orientation and the iPad
        1. Going beyond basic support
    3. Detecting Hardware Differences
      1. Camera Availability
      2. Audio Input Availability
      3. GPS Availability
      4. Magnetometer Availability
    4. Setting Required Hardware Capabilities
      1. Persistent WiFi
      2. Background Modes
  5. 2. Using the Camera
    1. The Hardware
    2. Capturing Stills and Video
    3. Video Thumbnails
      1. Video Thumbnails Using the UIImagePicker
      2. Video Thumbnails Using AVFoundation
    4. Saving Media to the Photo Album
    5. Video Customization
  6. 3. Using Audio
    1. The Hardware
    2. Media Playback
    3. Recording and Playing Audio
      1. Recording Audio
      2. Playing Audio
  7. 4. Using the Accelerometer
    1. About the Accelerometer
    2. Writing an Accelerometer Application
    3. Determining Device Orientation
      1. Determining Device Orientation Directly Using the Accelerometer
      2. Obtaining Notifications when Device Orientation Changes
      3. Which Way Is Up?
      4. Convenience Methods for Orientation
    4. Detecting Shaking
  8. 5. Using the Magnetometer
    1. About the Magnetometer
    2. Writing a Magnetometer Application
      1. Determining the Heading in Landscape Mode
    3. Measuring a Magnetic Field
  9. 6. Using Core Motion
    1. Core Motion
      1. Pulling Motion Data
      2. Pushing Motion Data
    2. Accessing the Gyroscope
    3. Measuring Device Motion
      1. Comparing Device Motion with the Accelerometer
  10. 7. Going Further
    1. The iPhone SDK
    2. Geolocation and Maps
      1. Third-Party SDKs
    3. Speech Recognition
    4. Computer Vision
      1. Augmented Reality
    5. External Accessories
  11. About the Author
  12. Colophon
  13. Special Upgrade Offer
  14. Copyright