O'Reilly logo

Windows 8 Application Development with HTML5 For Dummies by Bill Sempf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13

Integrating with Hardware

In This Chapter

arrow Using the sensors on devices

arrow Collecting contextual information

arrow Getting feedback to the user

WinRT does one thing that is really hard to do from the .NET framework: It gives us access to devices. The webcam, microphone, sensors, near-field communication, and the touch screen itself is really hard to access from .NET, and it’s very easy in WinRT.

Tight integration with the hardware is important for making the app feel alive to the user. When the user is holding a device and she turns around, have the application react to that if it’s appropriate. When the user touches something on the screen, provide some haptic feedback (that little bump that your phone does when you touch a button). Give the user the ability to communicate with your app by voice.

Closely related to the sensors on a device is the media that can be shown on it. The camera and microphone gives a content creator a path to generating content that makes her device hers, and the HTML5 features I discussed in Chapter 5 close the loop, and give her a way to view that content.

WinRT takes all of the cryptic communication structures out of programming for the device’s sensors. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required