In this chapter, we will learn how to write our first sensor program. We will also understand the various callbacks, and how to use these callbacks in the foreground activity and background service. This chapter will also walk you through a basic algorithm developed using sensor values.
We will cover the following topics in this chapter:
- Understanding various sensor framework callbacks
- Using sensors in the foreground activity
- Listing the available sensors on a device
- Knowing individual sensors' capabilities
- Getting the sensor values and updating the user interface
- Monitoring sensor values in the background service