Hi, I’m trying to set a 10-second timer when click take the photo button and it has to take a photo in ImagePicker, how i can achieve that. I like to use ImagePicker because it allowing mobile camera UI so it’s easy to use portrait mode. Please help me I’m new to react.
_pickImage = async (openType) => {
const { status } = await
Permissions.askAsync(Permissions.CAMERA,Permissions.CAMERA_ROLL);
if (status === 'granted') {
await Permissions.askAsync(Permissions.CAMERA);
await Permissions.askAsync(Permissions.CAMERA_ROLL);
// await new Promise((resolve)=>setTimeout(() => {
// console.log("timeout");
// resolve();
// }, 5000));
resultcam = await ImagePicker.launchCameraAsync({
mediaTypes: ImagePicker.MediaTypeOptions.All,
allowsEditing: false,
quality: 0.2,
aspect: [4, 3],
});
console.log(resultcam.uri);
}
};