2016年3月9日星期三

Sensor in Android Tutorial: Barometer Sensor

 One of the most interesting topics in my opinion is how to use Sensor in Android. Nowadays our smartphone are full of sensors and we can use it to control somehow our app.

The most common sensors are:
• GPS
• Proximity sensor
• Light sensor
• Temperature sensor
Barometer sensor
• NFC
just to mention some of them. In this post we will explain how to obtain a list of sensor and how we can use one of them (i.e Barometer sensor).


Using sensor in android
When we develop an android app and we need a specific sensor so that our app can run we have two different choices:
• Specify it the sensor in the AndroidManifest.xml
• Detect the sensor list and check if the one we are interested on is available

 iSweek(http://www.isweek.com/)- Industry sourcing & Wholesale industrial products

没有评论:

发表评论