Name Date Size #Lines LOC

..26-Sep-2023-

android/H26-Sep-2023-1,8551,528

build/H26-Sep-2023-2,4551,774

ios/H26-Sep-2023-2,0121,697

plugin/H26-Sep-2023-282240

src/H26-Sep-2023-2,8352,103

.eslintrc.jsH A D26-Sep-2023103 31

.npmignoreH A D26-Sep-2023183 128

CHANGELOG.mdH A D26-Sep-202316.2 KiB316174

README.mdH A D26-Sep-20232.8 KiB7853

app.plugin.jsH A D26-Sep-202355 21

babel.config.jsH A D26-Sep-2023104 31

expo-module.config.jsonH A D26-Sep-2023191 1110

package.jsonH A D26-Sep-20231.4 KiB4645

tsconfig.jsonH A D26-Sep-2023217 109

README.md

1<p>
2  <a href="https://docs.expo.dev/versions/latest/sdk/camera/">
3    <img
4      src="../../.github/resources/expo-camera.svg"
5      alt="expo-camera"
6      height="64" />
7  </a>
8</p>
9
10A React component that renders a preview for the device's either front or back camera. Camera's parameters like zoom, auto focus, white balance and flash mode are adjustable. With expo-camera, one can also take photos and record videos that are saved to the app's cache. Morever, the component is also capable of detecting faces and bar codes appearing on the preview.
11
12# API documentation
13
14- [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/camera.mdx)
15- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/camera/)
16
17# Installation in managed Expo projects
18
19For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/camera/).
20
21# Installation in bare React Native projects
22
23For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
24
25### Add the package to your npm dependencies
26
27```
28npx expo install expo-camera
29```
30
31### Configure for iOS
32
33Add `NSCameraUsageDescription` and `NSMicrophoneUsageDescription` keys to your `Info.plist`:
34
35```xml
36<key>NSCameraUsageDescription</key>
37<string>Allow $(PRODUCT_NAME) to use the camera</string>
38<key>NSMicrophoneUsageDescription</key>
39<string>Allow $(PRODUCT_NAME) to use the microphone</string>
40```
41
42Run `npx pod-install` after installing the npm package.
43
44### Configure for Android
45
46This package automatically adds the `CAMERA` permission to your app. If you want to record videos with audio, you have to include the `RECORD_AUDIO`.
47
48```xml
49<!-- Added permissions -->
50<uses-permission android:name="android.permission.CAMERA" />
51
52<!-- Optional permissions -->
53<uses-permission android:name="android.permission.RECORD_AUDIO" />
54```
55
56Adjust the `android/build.gradle` to add a new `maven` block after all other repositories as described below:
57
58```gradle
59allprojects {
60    repositories {
61
62        // * Your other repositories here *
63
64        // * Add a new maven block after other repositories / blocks *
65        maven {
66            // expo-camera bundles a custom com.google.android:cameraview
67            url "$rootDir/../node_modules/expo-camera/android/maven"
68        }
69    }
70}
71```
72
73The sourcecode for `cameraview` can be found at [`expo/cameraview`](https://github.com/expo/cameraview).
74
75# Contributing
76
77Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).
78