Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Android Sensor Programming By Example
  • Table Of Contents Toc
Android Sensor Programming By Example

Android Sensor Programming By Example

By : Nagpal
4.8 (4)
close
close
Android Sensor Programming By Example

Android Sensor Programming By Example

4.8 (4)
By: Nagpal

Overview of this book

Android phones available in today’s market have a wide variety of powerful and highly precise sensors. Interesting applications can be built with them such as a local weather app using weather sensors, analyzing risky driving behavior using motion sensors, a fitness tracker using step-counter sensors, and so on. Sensors in external devices such as Android Watch, Body Analyzer & Weight Machine, Running Speed Cell, and so on can also be connected and used from your Android app running on your phone. Moving further, this book will provide the skills required to use sensors in your Android applications. It will walk you through all the fundamentals of sensors and will provide a thorough understanding of the Android Sensor Framework. You will also get to learn how to write code for the supportive infrastructure such as background services, scheduled and long running background threads, and databases for saving sensor data. Additionally, you will learn how to connect and use sensors in external devices from your Android app using the Google Fit platform. By the end of the book, you will be well versed in the use of Android sensors and programming to build interactive applications.
Table of Contents (8 chapters)
close
close

Chapter 4. The Light and Proximity Sensors

In this chapter, we will learn about proximity and light sensors, and we will develop a small application using them. We will also learn about the concepts of wake locks and wakeup and non-wakeup sensors. We will understand the hardware sensor FIFO queue and what happens to sensors when the application processor goes into suspended mode.

You will learn the following things in this chapter:

  • Understanding the light and proximity sensors.
  • Understanding requirements for the automatic torchlight and screen brightness app.
  • How to use the proximity sensor in the phone and turn phone's flashlight off and on.
  • How to use the phone's light sensor and adjust the screen brightness.
  • What are wake locks and how should we use them?
  • What are wakeup and non-wakeup sensors, and what is the hardware FIFO sensor queue?
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Android Sensor Programming By Example
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon