Skip to content
Back to skills

Add Expo Camera

ASecurity

Add expo-camera for in-app camera, video recording, barcode scanning. Use when the user says 'camera', 'expo-camera', 'take photo', 'barcode scan', 'QR scanner'.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 4, 2026
developmentrustbashreact

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned October 4, 2026

npx -y skills add khadinakbarlabs/expo-mobile-app-builder --skill add-expo-camera --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Add Expo Camera?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Add Expo Camera
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/khadinakbarlabs-add-expo-camera/badge)](https://www.skillsdirectory.com/skills/khadinakbarlabs-add-expo-camera)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "add-expo-camera"
description: "Add expo-camera for in-app camera, video recording, barcode scanning. Use when the user says 'camera', 'expo-camera', 'take photo', 'barcode scan', 'QR scanner'."
---

# Add Expo Camera

In-app camera for photo, video, barcode/QR.

## Install
```bash
npm exec --no -- expo install expo-camera
```

## app.json
```json
{
  "expo": {
    "plugins": [
      ["expo-camera", { "cameraPermission": "Allow $(PRODUCT_NAME) to access your camera." }]
    ]
  }
}
```

## Photo capture
```tsx
import { CameraView, useCameraPermissions } from 'expo-camera';
import { useRef, useState } from 'react';

export default function CameraScreen() {
  const [permission, requestPermission] = useCameraPermissions();
  const [photo, setPhoto] = useState<string | null>(null);
  const ref = useRef<CameraView>(null);

  if (!permission) return <View />;
  if (!permission.granted) return <Pressable onPress={requestPermission}><Text>Grant camera</Text></Pressable>;

  const takePhoto = async () => {
    const result = await ref.current?.takePictureAsync({ quality: 0.8 });
    if (result?.uri) setPhoto(result.uri);
  };

  return (
    <CameraView ref={ref} style={{ flex: 1 }} facing="back">
      <Pressable onPress={takePhoto} style={styles.shutterButton} />
    </CameraView>
  );
}
```

## Barcode / QR scanning
```tsx
const handleBarcodeScanned = ({ data }: { data: string }) => {
  if (!/^[A-Za-z0-9._~-]{1,256}$/.test(data)) {
    showInvalidCodeMessage();
    return;
  }

  router.push({ pathname: '/scanned/[data]', params: { data } });
};

<CameraView
  barcodeScannerSettings={{ barcodeTypes: ['qr', 'ean13', 'code128'] }}
  onBarcodeScanned={handleBarcodeScanned}
  style={{ flex: 1 }}
/>
```

## Permission pre-prompt
Always pre-prompt with custom UI explaining WHY before triggering system dialog. iOS only gives ONE shot — denied = locked out unless user opens Settings manually.

Treat barcode data as untrusted input. Validate its expected format and pass it as a structured route parameter; do not concatenate it into a navigation URL or use it to open arbitrary links.

## Reference
`references/01-expo-sdk-54.md`

Files in this skill

  • SKILL.md2.1 KB
  • agents/openai.yaml176 B
  • references/01-expo-sdk-54.md1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…