Skip to Main Content
PhoneGap Build
book

PhoneGap Build

by Bintu Harwani
November 2013
Intermediate to advanced content levelIntermediate to advanced
303 pages
8h 45m
English
Auerbach Publications
Content preview from PhoneGap Build
192 ◾  PhoneGap Build
var cameraOptions = {
quality : 50,
sourceType : Camera.PictureSourceType.CAMERA,
destinationType : Camera.DestinationType.FILE_URI,
allowEdit : true,
encodingType: Camera.EncodingType.JPEG,
targetWidth: 100,
targetHeight: 200};
navigator.camera.getPicture(onSuccess, onFail, cameraOptions);
function onSuccess(data) {
capturedImage = document.getElementById("capturedImage");
capturedImage.src = data;
}
function onFail(err) {
alert('Command Cancelled or Error occurred while retrieving the image:
' + err);
}
Let us create an application to see how PhoneGap’s Camera API is used for invoking the
device’s default camera applicat ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning App Development with Parse and Phonegap

Beginning App Development with Parse and Phonegap

Wilkins Fernandez, Stephan Alber
Ajax For Dummies®

Ajax For Dummies®

PhD Steve Holzner

Publisher Resources

ISBN: 9781466589742