Preparing search index...
    • Opens the device's camera to capture a new photo

      Launches the camera interface allowing users to take a new photo with built-in cropping functionality. Returns the file path of the captured and cropped image.

      Parameters

      • themeColors: MD3Colors

        React Native Paper theme colors for UI consistency

      Returns Promise<string>

      Promise resolving to the file path of captured image, or empty string if cancelled

      const { colors } = useTheme();
      const photoPath = await takePhoto(colors);

      if (photoPath) {
      console.log(`Photo captured: ${photoPath}`);
      // Process the captured photo
      } else {
      console.log('User cancelled photo capture');
      }