function capturePhoto() {
// Take picture using device camera and retrieve image as base64-encoded string
navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50,
destinationType: destinationType.DATA_URL });
}
It works like a charm on both IOS and Android, I think I miss something with ng-cordova.
Actually, if you put in your angular app “ngCordova”, but launch a custom build for the camera plugin, the module will be named “ngCordova.plugins.camera”, so that’s the reason why it wasn’t found.
OK it works guys.
I downloaded a custom build, and declare “ngCordova.plugins.camera” plugin.
Xcode told me it doesn’t find Camera device, so I removed cordova camera plugin and add it again (a kind of refresh) and camera capture works fine.