Skip to Content
Android Sensor Programming By Example
book

Android Sensor Programming By Example

by Varun Nagpal
April 2016
Intermediate to advanced content levelIntermediate to advanced
194 pages
4h 37m
English
Packt Publishing
Content preview from Android Sensor Programming By Example

The automatic torch light and screen brightness app requirements

As a learning assignment for this chapter, we will be developing a small application that will make use of the light and proximity sensor in the phone to turn on and turn off the flash light and adjust the screen brightness. This app will be running in the foreground Android activity and will start processing the sensor values on onResume() and will stop on onPause(). We will have the separate activity for each proximity sensor and light sensor, and both will work independently. The following are the high-level requirements for the automatic torch light application:

  1. Create an Android activity to process the proximity sensor values.
  2. Whenever any object comes close to the phone (the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Android High Performance Programming

Android High Performance Programming

Enrique López Mañas, Diego Grancini
Android Things Projects

Android Things Projects

Francesco Azzola
Learning Embedded Android N Programming

Learning Embedded Android N Programming

Ivan Morgillo, Stefano Viola

Publisher Resources

ISBN: 9781785285509Supplemental Content