HI,
I have being using oj-file-picker to upload multiple files. If it web application am able to upload multiple files.
If i use android device to upload files,am looking for camera option and gallery option to upload files.
How to do camera capture with oj-file-picker ?
Note : If i use oj-file-picker with camera option ,since i use oj-file-picker it always direct to open gallery
HTML FILE
<oj-file-picker class='oj-filepicker-custom'
capture="environment"
selectOn='click' id='btnGo'
on-oj-select='[[selectListener]]'>
<oj-button slot='trigger'>
<span slot='startIcon' class='oj-fwk-icon oj-fwk-icon-arrowbox-n'></span>
Upload
</oj-button>
JS Code
self. selectListener = function(event) {
if (navigator.camera && typeof navigator.camera !== "undefined") {
alert('inside if')
// sample camera options, using defaults here but for illustration....
//Note that the destinationType can be a DATA_URL but cordova plugin warns of memory usage on that.
var cameraOptions = {
quality: 50,
destinationType: Camera.DestinationType.FILE_URL,
sourceType: Camera.PictureSourceType.CAMERA,
allowEdit: false,
encodingType: Camera.EncodingType.JPEG,
saveToPhotoAlbum: false,
correctOrientation: true
};
//use camera pluging method to take a picture, use callbacks for handling result
navigator.camera.getPicture(cameraSuccess, cameraError, cameraOptions);
}