Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
JavaScript Mobile Application Development

You're reading from  JavaScript Mobile Application Development

Product type Book
Published in Oct 2014
Publisher
ISBN-13 9781783554171
Pages 332 pages
Edition 1st Edition
Languages
Toc

Table of Contents (15) Chapters close

JavaScript Mobile Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. An Introduction to Apache Cordova 2. Developing Your First Cordova Application 3. Apache Cordova Development Tools 4. Cordova API in Action 5. Diving Deeper into the Cordova API 6. Developing Custom Cordova Plugins 7. Unit Testing the Cordova App's Logic 8. Applying it All – the Mega App Index

Camera


The camera plugin provides access to the device's camera in order to take pictures. This plugin also allows you to pick images from the device's image library.

In order to use the camera in our Apache Cordova project, we need to use the following cordova plugin add command:

> cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git

Demo

In order to access the camera demo, you need to click on the camera list item. You will be introduced to the Camera page. You can click on the Get Picture button in order to select whether to get a picture from the device's gallery or the device's camera. If you choose the Camera menu item, the default camera application of the device will be launched for you to capture a picture. If you choose the Gallery menu item, the device's gallery will be opened for you to pick an image. After getting the image from the camera or the gallery, you will be able to view the image on the Camera page, as shown in the following screenshot...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}