Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Sensor Programming By Example

You're reading from   Android Sensor Programming By Example Take your Android applications to the next level of interactivity by exploring the wide variety of Android sensors

Arrow left icon
Product type Paperback
Published in Apr 2016
Publisher Packt
ISBN-13 9781785285509
Length 194 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Varun Nagpal Varun Nagpal
Author Profile Icon Varun Nagpal
Varun Nagpal
Arrow right icon
View More author details
Toc

Table of Contents (8) Chapters Close

Preface 1. Sensor Fundamentals FREE CHAPTER 2. Playing with Sensors 3. The Environmental Sensors – The Weather Utility App 4. The Light and Proximity Sensors 5. The Motion, Position, and Fingerprint Sensors 6. The Step Counter and Detector Sensors – The Pedometer App 7. The Google Fit Platform and APIs – The Fitness Tracker App

Sensor availability based on the Android API level

There is a wide variety of sensors that are supported on Android devices. As Android evolved over a period of time, new sensors were added, and some old, inefficient sensors were removed. With the release of newer versions of Android, they got better and more accurate, and the list of supported sensors got bigger. Most of the apps have to support older versions of Android to target the wider audience. But at the same time, not all sensors are supported by older versions of Android. It's a tradeoff between supporting older versions of Android versus getting to use the latest and more advanced sensors that are only available in newer versions of Android.

The following table provides the sensor availability list based on the Android version and API levels. This table illustrates four major platforms to show availability, as the major changes were made in these four platforms only:

Sensor

Android 6.0 (API Level 23)

Android 4.0 (API Level 14)

Android 2.3 (API Level 9)

Android 2.2 (API Level 8)

Accelerometer

Available

Available

Available

Available

Ambient temperature

Available

Available

NA

NA

Gravity

Available

Available

Available

NA

Gyroscope

Available

Available

Available

NA

Light

Available

Available

Available

Available

Linear acceleration

Available

Available

Available

NA

Magnetic field

Available

Available

Available

Available

Orientation

Deprecated

Deprecated

Deprecated

Deprecated

Pressure

Available

Available

Available

NA

Proximity

Available

Available

Available

Available

Relative humidity

Available

Available

NA

NA

Rotation vector

Available

Available

Available

NA

Step Detector

Available

NA

NA

NA

Step Counter

Available

NA

NA

NA

Temperature

Deprecated

Deprecated

Available

Available

You have been reading a chapter from
Android Sensor Programming By Example
Published in: Apr 2016
Publisher: Packt
ISBN-13: 9781785285509
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image