<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8211560\x26blogName\x3dTech+Tips,+Tricks+%26+Trivia\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://mvark.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://mvark.blogspot.com/\x26vt\x3d-5147029996388199615', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tech Tips, Tricks & Trivia

by 'Anil' Radhakrishna
An architect's notes, experiments, discoveries and annotated bookmarks.

Search from over a hundred HOW TO articles, Tips and Tricks


Smartphone Sensors

If you've wondered about sensors while reading about the spec of a smartphone, the official Android documentation for developers is a good place to learn more about them -
* Most Android-powered devices have built-in sensors that measure motion, orientation, and various environmental conditions.
* A game might track readings from a device's gravity sensor to infer complex user gestures and motions, such as tilt, shake, rotation, or swing. Likewise, a weather application might use a device's temperature sensor and humidity sensor to calculate and report the dewpoint, or a travel application might use the geomagnetic field sensor and accelerometer to report a compass bearing.
* The Android sensor framework lets you access many types of sensors.
* Few Android-powered devices have every type of sensor. For example, most handset devices and tablets have an accelerometer and a magnetometer, but fewer devices have barometers or thermometers. Also, a device can have more than one sensor of a given type.
* The Android platform supports three broad categories of sensors:
  - Motion sensors - accelerometers, gravity sensors, gyroscopes, and rotational vector sensors.
  - Environmental sensors - ambient light, pressure, humidity, temparature
  - Position sensors - orientation sensors and magnetometers.

Sensor Type Description Common Uses
ACCELEROMETER Hardware Measures the acceleration force in m/s2 that is applied to a device on all three physical axes (x, y, and z), including the force of gravity. Motion detection (shake, tilt, etc.).
AMBIENT TEMPERATURE Hardware Measures the ambient room temperature in degrees Celsius (°C).   Monitoring air temperatures.
GRAVITY Software or Hardware Measures the force of gravity in m/s2 that is applied to a device on all three physical axes (x, y, z). Motion detection (shake, tilt, etc.).
GYROSCOPE Hardware Measures a device's rate of rotation in rad/s around each of the three physical axes (x, y, and z). Rotation detection (spin, turn, etc.).
LIGHT Hardware Measures the ambient light level (illumination) in lx. Controlling screen brightness.
LINEAR ACCELERATION Software or Hardware Measures the acceleration force in m/s2 that is applied to a device on all three physical axes (x, y, and z), excluding the force of gravity. Monitoring acceleration along a single axis.
MAGNETIC FIELD Hardware Measures the ambient geomagnetic field for all three physical axes (x, y, z) in μT. Creating a compass.
ORIENTATION Software Measures degrees of rotation that a device makes around all three physical axes (x, y, z). The orientation sensor was deprecated in Android 2.2. As of API level 3 you can obtain the inclination matrix and rotation matrix for a device by using the gravity sensor and the geomagnetic field sensor  Determining device position.
PRESSURE Hardware Measures the ambient air pressure in hPa or mbar. Monitoring air pressure changes.
PROXIMITY Hardware Measures the proximity of an object in cm relative to the view screen of a device. This sensor is typically used to determine whether a handset is being held up to a person's ear.
A proximity sensor often emits an electromagnetic field or a beam of electromagnetic radiation (infrared, for instance), and looks for changes in the field or return signal. 
Phone position during a call.
RELATIVE HUMIDITY Hardware Measures the relative ambient humidity in percent (%). Monitoring dewpoint, absolute, and relative humidity.
ROTATION VECTOR Software or Hardware Measures the orientation of a device by providing the three elements of the device's rotation vector.
Game Rotation Vector Sensor does not use the geomagnetic field.
Geomagnetic Rotation Vector Sensor uses a magnetometer instead of a gyroscope
Motion detection and rotation detection.
TEMPERATURE Hardware Measures the temperature of the device in degrees Celsius (°C). This sensor implementation varies across devices and this sensor was replaced with the AMBIENT TEMPERATURE sensor in API Level 14 Monitoring temperatures.

Sensors not explicitly covered by Android documentation -
*  Hall effect sensors are used for proximity switching, positioning, speed detection, and current sensing applications
* Fingerprint Sensor
* Infrared Sensor

Related: Sensors supported by Windows Phone 10

Labels: ,

Tweet this | Google+ it | Share on FB

« Home | Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »

»

Post a Comment