How to use the expo-barcode-scanner.BarCodeScanner.requestPermissionsAsync function in expo-barcode-scanner

To help you get started, we’ve selected a few expo-barcode-scanner 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 / bar-code-scanner.js View on Github external
(async () => {
      const { status } = await BarCodeScanner.requestPermissionsAsync();
      setHasPermission(status === 'granted');
  }, []);


Allows scanning variety of supported barcodes both as standalone module and as extension for expo-camera. It also allows scanning barcodes from existing images.

Latest version published 17 days ago

Package Health Score

92 / 100
Full package analysis