How to use the expo-camera.Camera.requestPermissionsAsync function in expo-camera

To help you get started, we’ve selected a few expo-camera examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / docs / static / examples / unversioned / camera.js View on Github external
(async () => {
      const { status } = await Camera.requestPermissionsAsync();
      setHasPermission(status === 'granted');
    })();
  }, []);

expo-camera

A 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 t

MIT
Latest version published 17 days ago

Package Health Score

92 / 100
Full package analysis