Chapter 7Sensors and Other Hardware
- Using sensors in your web applications
- Testing your sensor code in the Simulator
- Near field communication (NFC)
The wrox.com code downloads for this chapter are found at www.wrox.com/go/professionaltizen on the Download Code tab. The code is in the Chapter 7 download section, and after decompressing the downloaded Zip files, you will have a project folder containing the full code for the Leveller sample.
In this chapter you’ll create a fully functional code sample in order to learn how to use sensors in your Tizen web applications. By building an application step by step, you’ll learn how to use the W3C DeviceOrientation Event API to monitor and respond to sensor data and discover how to test sensor functionality in the Web Simulator before running your application on a device.
Near field communication (NFC) is a technology for short-range wireless communication which is exploding in popularity and is well supported by the Tizen Device APIs. The second part of the chapter shows you how to use NFC in your Tizen applications.
DEVICE ORIENTATION
Sometimes your application needs to know the device’s orientation so that it can respond to it accordingly. For example, if you were writing a spirit level application, the application itself would only be useful if it knew the device’s orientation. Another obvious example would be a compass. Without some way for your application to ...
Get Professional Tizen Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.