Need to set timer in ImagePicker

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);
     }
};

someone please helps me to set a timer to take a picture

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.