16.11.2015 Views

PG2

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

x<br />

Contents<br />

Part III PhoneGap APIs. ........................155<br />

Chapter 10 Accelerometer. ................................. 157<br />

Querying Device Orientation 158<br />

Watching a Device’s Orientation 162<br />

Chapter 11 Camera ....................................... 165<br />

Accessing a Picture 165<br />

Configuring Camera Options 176<br />

quality 177<br />

destinationType 178<br />

sourceType 179<br />

allowEdit 180<br />

encodingType 181<br />

targetHeight and targetWidth 181<br />

mediaType 181<br />

Dealing with Camera Problems 182<br />

Chapter 12 Capture ....................................... 185<br />

Using the Capture API 186<br />

Configuring Capture Options 189<br />

duration 190<br />

limit 190<br />

mode 190<br />

Capture at Work 191<br />

Chapter 13 Compass ...................................... 205<br />

Getting Device Heading 205<br />

Watching Device Heading 209<br />

watchHeading 210<br />

watchHeadingFilter 213<br />

Chapter 14 Connection .................................... 217<br />

Chapter 15 Contacts. ...................................... 223<br />

Creating a Contact 224<br />

Searching for Contacts 236<br />

Cloning Contacts 242<br />

Removing Contacts 242<br />

Chapter 16 Device. ........................................ 243<br />

Chapter 17 Events. ........................................ 249<br />

Creating an Event Listener 249<br />

deviceready Event 250

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!