April 2016
Intermediate to advanced
194 pages
4h 37m
English
Environment-based sensors measure environmental conditions (temperature, humidity, and pressure) around the phone and report values only in one dimension (only one value in the values[] array). Temperature and humidity sensors have an on-change reporting mode, that is, they will report values whenever there is a change in values from the last reported values, whereas the pressure sensor has a continuous reporting mode; that is, it will report values continuously as per the suggested time interval. Environmental sensors are hardware-based and are only available if a device manufacturer has built them into a device. Because of this, it's particularly important that you verify, at runtime, that an environment sensor ...