Cargando…

Android Sensor Programming By Example.

Take your Android applications to the next level of interactivity by exploring the wide variety of Android sensorsAbout This BookGet a thorough understanding of the fundamentals and framework of Android sensors. Acquire knowledge of advance sensor programming, and learn how to connect and use sensor...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Nagpal, Varun (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Packt Publishing 2016.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Sensor Fundamentals; What are sensors?; Types of sensors; Types of sensor values; Motion, position, and environmental sensors; Motion sensors; Position sensors; Environmental sensors; Sensors' coordinate system; Android Sensor Stack; Components of the sensor framework; SensorManager; SensorEventListener; Sensor; SensorEvent; Sensor's sampling period, power, and battery consumption; The reporting modes of sensors; Dealing with specific sensor configuration.
  • Checking the availability of the sensor at runtimeDeclaring the sensor as mandatory feature; Sensor availability based on the Android API level; Best practice for accessing sensors; Summary; Chapter 2: Playing with Sensors; Understanding the sensor framework callbacks; Seeing the big picture; Time for action
  • using sensors in the foreground activity; What just happened?; Time for action
  • listing the available sensors on a device; What just happened?; Time for action
  • knowing individual sensors' capabilities; What just happened?
  • Time for action
  • getting the sensor values and updating the user interfaceWhat just happened?; Time for action
  • processing the sensor values in the background service; The phone handling algorithm; What just happened?; Summary; Chapter 3: The Environmental Sensors
  • The Weather Utility App; The weather utility app's requirements; Understanding environmental sensors; Time for action
  • using the temperature sensor; What just happened?; Getting air pressure from the phone's pressure sensor; Time for action
  • calculating the altitude using the pressure sensor; What just happened?
  • Getting relative humidity from the phone's humidity sensorTime for action
  • calculating the dew point and absolute humidity; What just happened?; Time for action
  • comparing the temperature, humidity, and pressure values from web services to phone sensors; Third-party web service
  • open weather map; Using Google Play Services Location API and AsyncTask; What just happened?; Summary; Chapter 4: The Light and Proximity Sensors; Understanding the light and proximity sensors; The automatic torch light and screen brightness app requirements.
  • Time for action
  • turning the torch light on and off using the proximity sensorWhat just happened?; Time for action
  • adjusting the screen brightness using the light sensor; What just happened?; Wake locks, wakeup sensors, and the FIFO queue; Wakeup and non-wakeup sensors; The sensor's hardware FIFO queue; Summary; Chapter 5: The Motion, Position, and Fingerprint Sensors; Understanding motion-based sensors; The accelerometer sensor; The gyroscope sensor; The gravity sensor; The linear acceleration sensor; The significant motion sensor; Understanding position-based sensors.