Closed Neha1490 closed 4 years ago
There is no open camera option at the moment But it also has a similar effect to setting as this for android: ImagePicker.openPicker({ isCamera:true, openCameraOnStart:true, returnAfterShot:true }) If ios you need to call openCamera
The "openCamera" option has been added. ImagePicker.openCamera({ width: 300, height: 400, cropping: true }).then(image => { console.log(image); });
Hi
Is it possible to open camera and gallery individually i.e. on click of "take picture from camera" open camera and on click of "take picture from gallery" open gallery?
@Neha1490 Yes it is, you just need to do this, ``` const options = [ { id: "take", label: "Take Photo..."}, { id: "choose", label: "Choose from Library..."}, ];
showPopupMenu(
options,
item => {
switch (item.id) {
case "take":
this.setState({ loading: false })
ImagePicker.openCamera({
width: 300,
height: 400,
isVideo: true
}).then(image => {
console.log('woza: ',image);
});
break;
case "choose":
this.addMultipleItems()
break;
}
},
this.addSupportingMediaButton
);
}`` that all
showPopupMenuis from
react-native-popup-menu-android`
Hi
Is it possible to open camera and gallery individually i.e. on click of "take picture from camera" open camera and on click of "take picture from gallery" open gallery?