The use of device sensors opens the doors to sophisticated apps, which may improve user experience and enhance the capabilities of a modern app. It's very important for a mobile developer to understand the power and limitations of device sensors in order to effectively use the APIs provided by the PhoneGap framework. Location data allows a mobile developer to tag every piece of information with the device's position. In this chapter, you will also learn to couple the Location API with your app.
In this chapter, you will:
Learn which are the most common device sensors and how to use them in order to enhance the user experience
Get an overview of the device orientation and device motion events using the accelerometer
Learn how to work with device sensors directly with JavaScript
Learn how to use the Compass API of PhoneGap
Learn about geolocation and how its data is available in the device
Learn how to use the PhoneGap Geolocation API and...