Update Readme.md

This commit is contained in:
Vladimir Enchev
2016-05-19 09:55:26 +03:00
parent 64d825c1cf
commit 0d3e665e4a

View File

@ -1,14 +1 @@
Sample usage: Allows you to take pictrues with the device's camera.
```
var camera = require("camera");
camera.takePicture({"width": 300, "height": 300, "keepAspectRatio": true, "saveToGallery": true}).then(function (image) {
console.log('pic taken - width: ' + image.width + ", height: " + image.height);
}).fail(function (error) {
console.log('pic canceled');
});
if(camera.isAvailable()){
console.log('you may take a picture');
}
```