---
description: Unofficial Capacitor plugin for Google ML Kit Barcode Scanning SDK to scan barcodes and QR codes. with support for Android, iOS, and Web.
title: Capacitor Barcode Scanner Plugin for Android, iOS & Web - Capawesome
image: https://capawesome.io/docs/assets/images/social/plugins/mlkit/barcode-scanning.png
---

[ Skip to content](#capacitor-mlkitbarcode-scanning) 

[ 🎉 Introducing **Capawesome Platform** — one platform for Live Updates, Native Builds, App Store Publishing, and Insider SDKs.](https://capawesome.io) 

* [  Formbricks ](/docs/plugins/formbricks/)
* [  Geocoder ](/docs/plugins/geocoder/)
* [  Google Sign-In ](/docs/plugins/google-sign-in/)
* [  libSQL ](/docs/plugins/libsql/)
* [  Live Update ](/docs/plugins/live-update/)
* [  Managed Configurations ](/docs/plugins/managed-configurations/)
* [  Media Session ](/docs/plugins/media-session/)
* [  ML Kit ](/docs/plugins/mlkit/)
* [  iOS ](#ios)
* [  Usage Description ](#usage-description)
* [  Web ](#web)
* [  Configuration ](#configuration)
* [  Demo ](#demo%5F1)
* [  Usage ](#usage)
* [  API ](#api)
* [  Type Aliases ](#type-aliases)
* [  Enums ](#enums)
* [  Terms & Privacy ](#terms-privacy)
* [  Changelog ](#changelog)
* [  License ](#license)
* [  Document Scanner ](/docs/plugins/mlkit/document-scanner/)
* [  Face Detection ](/docs/plugins/mlkit/face-detection/)
* [  Face Mesh Detection ](/docs/plugins/mlkit/face-mesh-detection/)
* [  Selfie Segmentation ](/docs/plugins/mlkit/selfie-segmentation/)
* [  Subject Segmentation ](/docs/plugins/mlkit/subject-segmentation/)
* [  Translation ](/docs/plugins/mlkit/translation/)
* [  NFC ](/docs/plugins/nfc/)
* [  OAuth ](/docs/plugins/oauth/)
* [  Pedometer ](/docs/plugins/pedometer/)
* [  Photo Editor ](/docs/plugins/photo-editor/)
* [  PostHog ](/docs/plugins/posthog/)
* [  Printer ](/docs/plugins/printer/)
* [  Purchases ](/docs/plugins/purchases/)
* [  RealtimeKit ](/docs/plugins/realtimekit/)
* [  Screen Orientation ](/docs/plugins/screen-orientation/)
* [  Screenshot ](/docs/plugins/screenshot/)
* [  Secure Preferences ](/docs/plugins/secure-preferences/)
* [  Speech Recognition ](/docs/plugins/speech-recognition/)
* [  Speech Synthesis ](/docs/plugins/speech-synthesis/)
* [  Share Target ](/docs/plugins/share-target/)
* [  Square Mobile Payments ](/docs/plugins/square-mobile-payments/)
* [  SQLite ](/docs/plugins/sqlite/)
* [  Superwall ](/docs/plugins/superwall/)
* [  Torch ](/docs/plugins/torch/)
* [  Wifi ](/docs/plugins/wifi/)
* [  Zip ](/docs/plugins/zip/)
* [  Cloud ](/docs/cloud/)
* [  Live Updates ](/docs/cloud/live-updates/)
* Advanced
* Integrations
* [  Native Builds ](/docs/cloud/native-builds/)
* [  Configuration ](/docs/cloud/native-builds/configuration/)
* [  Environments ](/docs/cloud/native-builds/environments/)
* Guides
* [  Sample Projects ](/docs/cloud/native-builds/sample-projects/)
* [  Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [  Automations ](/docs/cloud/automations/)
* [  Assist ](/docs/cloud/assist/)
* Account
* Organizations
* [  Organization and User Management ](/docs/cloud/organizations/memberships/)
* [  Single Sign-On (SSO) ](/docs/cloud/organizations/sso/)
* [  Teams ](/docs/cloud/organizations/teams/)
* [  Two-Factor Authentication ](/docs/cloud/organizations/two-factor-authentication/)
* [  Integrations ](/docs/cloud/integrations/)
* [  License Keys ](/docs/cloud/license-keys/)
* [  Webhooks ](/docs/cloud/webhooks/)
* [  Pricing ](https://capawesome.io/pricing/)
* [  FAQ ](/docs/cloud/faq/)
* [  Support ](/docs/cloud/support/)
* [  Contributing ](/docs/contributing/)
* [  LLMs ](/docs/llms/)
* [  Insiders ](/docs/insiders/)
* [  License ](https://capawesome.io/legal/eula/)
* [  Support ](/docs/insiders/support/)
* [  FAQ ](/docs/insiders/faq/)
* [  Blog ](/blog/)
* Categories

* [  iOS ](#ios)
* [  Usage Description ](#usage-description)
* [  Web ](#web)
* [  Configuration ](#configuration)
* [  Demo ](#demo%5F1)
* [  Usage ](#usage)
* [  API ](#api)
* [  Type Aliases ](#type-aliases)
* [  Enums ](#enums)
* [  Terms & Privacy ](#terms-privacy)
* [  Changelog ](#changelog)
* [  License ](#license)

# @capacitor-mlkit/barcode-scanning[¶](#capacitor-mlkitbarcode-scanning "Permanent link")

Unofficial Capacitor plugin for [ML Kit Barcode Scanning](https://developers.google.com/ml-kit/vision/barcode-scanning).[1](#fn:1)[2](#fn:2)

[ ![Deliver Live Updates to your Capacitor app with Capawesome Cloud](../../../assets/external/cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.69628c3f.png) ](https://cloud.capawesome.io/) 

## Features[¶](#features "Permanent link")

* 🧩 Optional ready-to-use interface without webview customizations
* 🏎️ Extremely fast
* 📷 Scan multiple barcodes at once
* ⏺️ Define detection area
* 🏞️ Reading barcodes from images
* 🔦 Torch and Autofocus support
* 🔋 Supports Android, iOS and web

For a complete list of **supported barcodes**, see [BarcodeFormat](#barcodeformat).

## Newsletter[¶](#newsletter "Permanent link")

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).

## Compatibility[¶](#compatibility "Permanent link")

| Plugin Version | Capacitor Version | Status         |
| -------------- | ----------------- | -------------- |
| 8.x.x          | \>=8.x.x          | Active support |
| 7.x.x          | 7.x.x             | Deprecated     |
| 6.x.x          | 6.x.x             | Deprecated     |
| 5.x.x          | 5.x.x             | Deprecated     |

## Demo[¶](#demo "Permanent link")

A working example can be found here: <https://github.com/robingenz/capacitor-mlkit-plugin-demo>

| Android                                                                                                                                                                       |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![Android demo of the ML Kit Barcode Scanning plugin](../../../assets/external/user-images.githubusercontent.com/13857929/224423595-b7e97595-8b2b-4cd7-b500-b30e10e11dfc.gif) |

## Guides[¶](#guides "Permanent link")

* [Announcing the Capacitor ML Kit Barcode Scanning Plugin](https://capawesome.io/blog/announcing-the-capacitor-mlkit-barcode-scanner-plugin/)
* [How to build an Ionic Barcode Scanner with Capacitor](https://ionic.io/blog/how-to-build-an-ionic-barcode-scanner-with-capacitor)

## Installation[¶](#installation "Permanent link")

You can use our **AI-Assisted Setup** to install the plugin. Add the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:

`[](#%5F%5Fcodelineno-0-1)npx skills add capawesome-team/skills --skill capacitor-plugins
`

Then use the following prompt:

`` [](#%5F%5Fcodelineno-1-1)Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capacitor-mlkit/barcode-scanning` plugin in my project.
 ``

If you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:

`[](#%5F%5Fcodelineno-2-1)npm install @capacitor-mlkit/barcode-scanning
[](#%5F%5Fcodelineno-2-2)npx cap sync
`

**Attention**: This plugin **only supports CocoaPods** for iOS dependency management. Swift Package Manager (SPM) is not supported for the ML Kit SDK, see [this comment](https://github.com/googlesamples/mlkit/issues/180#issuecomment-1298964099).

### Android[¶](#android "Permanent link")

#### Permissions[¶](#permissions "Permanent link")

This API requires the following permissions be added to your `AndroidManifest.xml` before the `application` tag:

`[](#%5F%5Fcodelineno-3-1)<uses-permission android:name="android.permission.CAMERA" />
`

You also need to add the following meta data **in** the `application` tag in your `AndroidManifest.xml`:

`[](#%5F%5Fcodelineno-4-1)<meta-data android:name="com.google.mlkit.vision.DEPENDENCIES" android:value="barcode_ui"/>
[](#%5F%5Fcodelineno-4-2)<!-- To use multiple models: android:value="face,model2,model3" -->
`

#### Variables[¶](#variables "Permanent link")

If needed, you can define the following project variable in your app’s `variables.gradle` file to change the default version of the dependency:

* `$androidxCameraCamera2Version` version of `androidx.camera:camera-camera2` (default: `1.5.2`)
* `$androidxCameraCoreVersion` version of `androidx.camera:camera-core` (default: `1.5.2`)
* `$androidxCameraLifecycleVersion` version of `androidx.camera:camera-lifecycle` (default: `1.5.2`)
* `$androidxCameraViewVersion` version of `androidx.camera:camera-view` (default: `1.5.2`)
* `$listenableFutureVersion` version of `com.google.guava:listenablefuture` (default: `1.0`)
* `$mlkitBarcodeScanningVersion` version of `com.google.mlkit:barcode-scanning` (default: `17.3.0`)
* `$playServicesCodeScannerVersion` version of `com.google.android.gms:play-services-code-scanner` (default: `16.1.0`)

This can be useful if you encounter dependency conflicts with other plugins in your project.

### iOS[¶](#ios "Permanent link")

#### Minimum Deployment Target[¶](#minimum-deployment-target "Permanent link")

Make sure to set the deployment target in your `ios/App/Podfile` to at least `15.5`:

`[](#%5F%5Fcodelineno-5-1)platform :ios, '15.5'
`

### Usage Description[¶](#usage-description "Permanent link")

Add the `NSCameraUsageDescription` key to the `ios/App/App/Info.plist` file, which tells the user why the app needs to use the camera:

`[](#%5F%5Fcodelineno-6-1)+ <key>NSCameraUsageDescription</key>
[](#%5F%5Fcodelineno-6-2)+ <string>The app enables the scanning of various barcodes.</string>
`

### Web[¶](#web "Permanent link")

#### Polyfill[¶](#polyfill "Permanent link")

This plugin uses the [Barcode Detection API](https://developer.mozilla.org/en-US/docs/Web/API/Barcode%5FDetection%5FAPI) to scan barcodes in the browser. This API is not yet supported in all browsers. You can check the compatibility [here](https://caniuse.com/mdn-api%5Fbarcodedetector). For this reason, we recommend installing the [barcode-detector](https://www.npmjs.com/package/barcode-detector) package for a better compatibility:

`[](#%5F%5Fcodelineno-7-1)npm install barcode-detector
`

This package provides a polyfill that uses [ZXing-C++ WebAssembly](https://github.com/Sec-ant/zxing-wasm) under the hood. After installing the package, you just need to import the polyfill in your code:

`[](#%5F%5Fcodelineno-8-1)import "barcode-detector/polyfill";
`

## Configuration[¶](#configuration "Permanent link")

No configuration required for this plugin.

## Demo[¶](#demo%5F1 "Permanent link")

A working example can be found here: [robingenz/capacitor-mlkit-plugin-demo](https://github.com/robingenz/capacitor-mlkit-plugin-demo)

## Usage[¶](#usage "Permanent link")

`` [](#%5F%5Fcodelineno-9-1)import {
[](#%5F%5Fcodelineno-9-2)  BarcodeScanner,
[](#%5F%5Fcodelineno-9-3)  BarcodeFormat,
[](#%5F%5Fcodelineno-9-4)  LensFacing,
[](#%5F%5Fcodelineno-9-5)} from '@capacitor-mlkit/barcode-scanning';
[](#%5F%5Fcodelineno-9-6)import { Torch } from '@capawesome/capacitor-torch';
[](#%5F%5Fcodelineno-9-7)
[](#%5F%5Fcodelineno-9-8)const startScan = async () => {
[](#%5F%5Fcodelineno-9-9)  // The camera is visible behind the WebView, so that you can customize the UI in the WebView.
[](#%5F%5Fcodelineno-9-10)  // However, this means that you have to hide all elements that should not be visible.
[](#%5F%5Fcodelineno-9-11)  // You can find an example in our demo repository.
[](#%5F%5Fcodelineno-9-12)  // In this case we set a class `barcode-scanner-active`, which then contains certain CSS rules for our app.
[](#%5F%5Fcodelineno-9-13)  document.querySelector('body')?.classList.add('barcode-scanner-active');
[](#%5F%5Fcodelineno-9-14)
[](#%5F%5Fcodelineno-9-15)  // Add the `barcodeScanned` listener
[](#%5F%5Fcodelineno-9-16)  const listener = await BarcodeScanner.addListener(
[](#%5F%5Fcodelineno-9-17)    'barcodeScanned',
[](#%5F%5Fcodelineno-9-18)    async result => {
[](#%5F%5Fcodelineno-9-19)      console.log(result.barcode);
[](#%5F%5Fcodelineno-9-20)    },
[](#%5F%5Fcodelineno-9-21)  );
[](#%5F%5Fcodelineno-9-22)
[](#%5F%5Fcodelineno-9-23)  // Start the barcode scanner
[](#%5F%5Fcodelineno-9-24)  await BarcodeScanner.startScan();
[](#%5F%5Fcodelineno-9-25)};
[](#%5F%5Fcodelineno-9-26)
[](#%5F%5Fcodelineno-9-27)const stopScan = async () => {
[](#%5F%5Fcodelineno-9-28)  // Make all elements in the WebView visible again
[](#%5F%5Fcodelineno-9-29)  document.querySelector('body')?.classList.remove('barcode-scanner-active');
[](#%5F%5Fcodelineno-9-30)
[](#%5F%5Fcodelineno-9-31)  // Remove all listeners
[](#%5F%5Fcodelineno-9-32)  await BarcodeScanner.removeAllListeners();
[](#%5F%5Fcodelineno-9-33)
[](#%5F%5Fcodelineno-9-34)  // Stop the barcode scanner
[](#%5F%5Fcodelineno-9-35)  await BarcodeScanner.stopScan();
[](#%5F%5Fcodelineno-9-36)};
[](#%5F%5Fcodelineno-9-37)
[](#%5F%5Fcodelineno-9-38)const scanSingleBarcode = async () => {
[](#%5F%5Fcodelineno-9-39)  return new Promise(async resolve => {
[](#%5F%5Fcodelineno-9-40)    document.querySelector('body')?.classList.add('barcode-scanner-active');
[](#%5F%5Fcodelineno-9-41)
[](#%5F%5Fcodelineno-9-42)    const listener = await BarcodeScanner.addListener(
[](#%5F%5Fcodelineno-9-43)      'barcodeScanned',
[](#%5F%5Fcodelineno-9-44)      async result => {
[](#%5F%5Fcodelineno-9-45)        await listener.remove();
[](#%5F%5Fcodelineno-9-46)        document
[](#%5F%5Fcodelineno-9-47)          .querySelector('body')
[](#%5F%5Fcodelineno-9-48)          ?.classList.remove('barcode-scanner-active');
[](#%5F%5Fcodelineno-9-49)        await BarcodeScanner.stopScan();
[](#%5F%5Fcodelineno-9-50)        resolve(result.barcode);
[](#%5F%5Fcodelineno-9-51)      },
[](#%5F%5Fcodelineno-9-52)    );
[](#%5F%5Fcodelineno-9-53)
[](#%5F%5Fcodelineno-9-54)    await BarcodeScanner.startScan();
[](#%5F%5Fcodelineno-9-55)  });
[](#%5F%5Fcodelineno-9-56)};
[](#%5F%5Fcodelineno-9-57)
[](#%5F%5Fcodelineno-9-58)const scan = async () => {
[](#%5F%5Fcodelineno-9-59)  const { barcodes } = await BarcodeScanner.scan({
[](#%5F%5Fcodelineno-9-60)    formats: [BarcodeFormat.QrCode],
[](#%5F%5Fcodelineno-9-61)    autoZoom: true,
[](#%5F%5Fcodelineno-9-62)  });
[](#%5F%5Fcodelineno-9-63)  return barcodes;
[](#%5F%5Fcodelineno-9-64)};
[](#%5F%5Fcodelineno-9-65)
[](#%5F%5Fcodelineno-9-66)const isSupported = async () => {
[](#%5F%5Fcodelineno-9-67)  const { supported } = await BarcodeScanner.isSupported();
[](#%5F%5Fcodelineno-9-68)  return supported;
[](#%5F%5Fcodelineno-9-69)};
[](#%5F%5Fcodelineno-9-70)
[](#%5F%5Fcodelineno-9-71)const enableTorch = async () => {
[](#%5F%5Fcodelineno-9-72)  await Torch.enable();
[](#%5F%5Fcodelineno-9-73)};
[](#%5F%5Fcodelineno-9-74)
[](#%5F%5Fcodelineno-9-75)const disableTorch = async () => {
[](#%5F%5Fcodelineno-9-76)  await Torch.disable();
[](#%5F%5Fcodelineno-9-77)};
[](#%5F%5Fcodelineno-9-78)
[](#%5F%5Fcodelineno-9-79)const toggleTorch = async () => {
[](#%5F%5Fcodelineno-9-80)  await Torch.toggle();
[](#%5F%5Fcodelineno-9-81)};
[](#%5F%5Fcodelineno-9-82)
[](#%5F%5Fcodelineno-9-83)const isTorchEnabled = async () => {
[](#%5F%5Fcodelineno-9-84)  const { enabled } = await Torch.isEnabled();
[](#%5F%5Fcodelineno-9-85)  return enabled;
[](#%5F%5Fcodelineno-9-86)};
[](#%5F%5Fcodelineno-9-87)
[](#%5F%5Fcodelineno-9-88)const isTorchAvailable = async () => {
[](#%5F%5Fcodelineno-9-89)  const { available } = await Torch.isAvailable();
[](#%5F%5Fcodelineno-9-90)  return available;
[](#%5F%5Fcodelineno-9-91)};
[](#%5F%5Fcodelineno-9-92)
[](#%5F%5Fcodelineno-9-93)const setZoomRatio = async () => {
[](#%5F%5Fcodelineno-9-94)  await BarcodeScanner.setZoomRatio({ zoomRatio: 0.5 });
[](#%5F%5Fcodelineno-9-95)};
[](#%5F%5Fcodelineno-9-96)
[](#%5F%5Fcodelineno-9-97)const getZoomRatio = async () => {
[](#%5F%5Fcodelineno-9-98)  const { zoomRatio } = await BarcodeScanner.getZoomRatio();
[](#%5F%5Fcodelineno-9-99)  return zoomRatio;
[](#%5F%5Fcodelineno-9-100)};
[](#%5F%5Fcodelineno-9-101)
[](#%5F%5Fcodelineno-9-102)const getMinZoomRatio = async () => {
[](#%5F%5Fcodelineno-9-103)  const { zoomRatio } = await BarcodeScanner.getMinZoomRatio();
[](#%5F%5Fcodelineno-9-104)  return zoomRatio;
[](#%5F%5Fcodelineno-9-105)};
[](#%5F%5Fcodelineno-9-106)
[](#%5F%5Fcodelineno-9-107)const getMaxZoomRatio = async () => {
[](#%5F%5Fcodelineno-9-108)  const { zoomRatio } = await BarcodeScanner.getMaxZoomRatio();
[](#%5F%5Fcodelineno-9-109)  return zoomRatio;
[](#%5F%5Fcodelineno-9-110)};
[](#%5F%5Fcodelineno-9-111)
[](#%5F%5Fcodelineno-9-112)const openSettings = async () => {
[](#%5F%5Fcodelineno-9-113)  await BarcodeScanner.openSettings();
[](#%5F%5Fcodelineno-9-114)};
[](#%5F%5Fcodelineno-9-115)
[](#%5F%5Fcodelineno-9-116)const isGoogleBarcodeScannerModuleAvailable = async () => {
[](#%5F%5Fcodelineno-9-117)  const { available } =
[](#%5F%5Fcodelineno-9-118)    await BarcodeScanner.isGoogleBarcodeScannerModuleAvailable();
[](#%5F%5Fcodelineno-9-119)  return available;
[](#%5F%5Fcodelineno-9-120)};
[](#%5F%5Fcodelineno-9-121)
[](#%5F%5Fcodelineno-9-122)const installGoogleBarcodeScannerModule = async () => {
[](#%5F%5Fcodelineno-9-123)  await BarcodeScanner.installGoogleBarcodeScannerModule();
[](#%5F%5Fcodelineno-9-124)};
[](#%5F%5Fcodelineno-9-125)
[](#%5F%5Fcodelineno-9-126)const checkPermissions = async () => {
[](#%5F%5Fcodelineno-9-127)  const { camera } = await BarcodeScanner.checkPermissions();
[](#%5F%5Fcodelineno-9-128)  return camera;
[](#%5F%5Fcodelineno-9-129)};
[](#%5F%5Fcodelineno-9-130)
[](#%5F%5Fcodelineno-9-131)const requestPermissions = async () => {
[](#%5F%5Fcodelineno-9-132)  const { camera } = await BarcodeScanner.requestPermissions();
[](#%5F%5Fcodelineno-9-133)  return camera;
[](#%5F%5Fcodelineno-9-134)};
 ``

An example of the CSS class `barcode-scanner-active` **with** Ionic Framework could be:

`[](#%5F%5Fcodelineno-10-1)// Hide all elements
[](#%5F%5Fcodelineno-10-2)body.barcode-scanner-active {
[](#%5F%5Fcodelineno-10-3)  visibility: hidden;
[](#%5F%5Fcodelineno-10-4)  --background: transparent;
[](#%5F%5Fcodelineno-10-5)  --ion-background-color: transparent;
[](#%5F%5Fcodelineno-10-6)}
[](#%5F%5Fcodelineno-10-7)
[](#%5F%5Fcodelineno-10-8)// Show only the barcode scanner modal
[](#%5F%5Fcodelineno-10-9).barcode-scanner-modal {
[](#%5F%5Fcodelineno-10-10)  visibility: visible;
[](#%5F%5Fcodelineno-10-11)}
[](#%5F%5Fcodelineno-10-12)
[](#%5F%5Fcodelineno-10-13)@media (prefers-color-scheme: dark) {
[](#%5F%5Fcodelineno-10-14)  .barcode-scanner-modal {
[](#%5F%5Fcodelineno-10-15)    --background: transparent;
[](#%5F%5Fcodelineno-10-16)    --ion-background-color: transparent;
[](#%5F%5Fcodelineno-10-17)  }
[](#%5F%5Fcodelineno-10-18)}
`

An example of the CSS class `barcode-scanner-active` **without** Ionic Framework could be:

`[](#%5F%5Fcodelineno-11-1)// Hide all elements
[](#%5F%5Fcodelineno-11-2)body.barcode-scanner-active {
[](#%5F%5Fcodelineno-11-3)  visibility: hidden;
[](#%5F%5Fcodelineno-11-4)}
[](#%5F%5Fcodelineno-11-5)
[](#%5F%5Fcodelineno-11-6)// Show only the barcode scanner modal
[](#%5F%5Fcodelineno-11-7).barcode-scanner-modal {
[](#%5F%5Fcodelineno-11-8)  visibility: visible;
[](#%5F%5Fcodelineno-11-9)}
`

If you can't see the camera view, make sure all elements in the DOM are not visible or have a transparent background to debug the issue.

## API[¶](#api "Permanent link")

* [startScan(...)](#startscan)
* [stopScan()](#stopscan)
* [readBarcodesFromImage(...)](#readbarcodesfromimage)
* [scan(...)](#scan)
* [isSupported()](#issupported)
* [enableTorch()](#enabletorch)
* [disableTorch()](#disabletorch)
* [toggleTorch()](#toggletorch)
* [isTorchEnabled()](#istorchenabled)
* [isTorchAvailable()](#istorchavailable)
* [setZoomRatio(...)](#setzoomratio)
* [getZoomRatio()](#getzoomratio)
* [getMinZoomRatio()](#getminzoomratio)
* [getMaxZoomRatio()](#getmaxzoomratio)
* [openSettings()](#opensettings)
* [isGoogleBarcodeScannerModuleAvailable()](#isgooglebarcodescannermoduleavailable)
* [installGoogleBarcodeScannerModule()](#installgooglebarcodescannermodule)
* [checkPermissions()](#checkpermissions)
* [requestPermissions()](#requestpermissions)
* [addListener('barcodesScanned', ...)](#addlistenerbarcodesscanned-)
* [addListener('scanError', ...)](#addlistenerscanerror-)
* [addListener('googleBarcodeScannerModuleInstallProgress', ...)](#addlistenergooglebarcodescannermoduleinstallprogress-)
* [removeAllListeners()](#removealllisteners)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)
* [Enums](#enums)

### startScan(...)[¶](#startscan "Permanent link")

`[](#%5F%5Fcodelineno-12-1)startScan(options?: StartScanOptions | undefined) => Promise<void>
`

Start scanning for barcodes.

| Param       | Type                                  |
| ----------- | ------------------------------------- |
| **options** | [StartScanOptions](#startscanoptions) |

**Since:** 0.0.1

---

### stopScan()[¶](#stopscan "Permanent link")

`[](#%5F%5Fcodelineno-13-1)stopScan() => Promise<void>
`

Stop scanning for barcodes.

**Since:** 0.0.1

---

### readBarcodesFromImage(...)[¶](#readbarcodesfromimage "Permanent link")

`[](#%5F%5Fcodelineno-14-1)readBarcodesFromImage(options: ReadBarcodesFromImageOptions) => Promise<ReadBarcodesFromImageResult>
`

Read barcodes from an image.

| Param       | Type                                                          |
| ----------- | ------------------------------------------------------------- |
| **options** | [ReadBarcodesFromImageOptions](#readbarcodesfromimageoptions) |

**Returns:** `Promise<[ReadBarcodesFromImageResult](#readbarcodesfromimageresult)>`

**Since:** 0.0.1

---

### scan(...)[¶](#scan "Permanent link")

`[](#%5F%5Fcodelineno-15-1)scan(options?: ScanOptions | undefined) => Promise<ScanResult>
`

Scan a barcode with a ready-to-use interface without WebView customization.

On **Android**, this method is only available on devices with Google Play Services installed. Therefore, no camera permission is required.

**Attention:** Before using this method on _Android_, first check if the Google [Barcode](#barcode) Scanner module is available by using `isGoogleBarcodeScannerModuleAvailable()`.

Only available on Android and iOS.

| Param       | Type                        |
| ----------- | --------------------------- |
| **options** | [ScanOptions](#scanoptions) |

**Returns:** `Promise<[ScanResult](#scanresult)>`

**Since:** 0.0.1

---

### isSupported()[¶](#issupported "Permanent link")

`[](#%5F%5Fcodelineno-16-1)isSupported() => Promise<IsSupportedResult>
`

Returns whether or not the barcode scanner is supported.

**Returns:** `Promise<[IsSupportedResult](#issupportedresult)>`

**Since:** 0.0.1

---

### enableTorch()[¶](#enabletorch "Permanent link")

`[](#%5F%5Fcodelineno-17-1)enableTorch() => Promise<void>
`

Enable camera's torch (flash) during a scan session.

Only available on Android and iOS.

**Since:** 7.2.0

---

### disableTorch()[¶](#disabletorch "Permanent link")

`[](#%5F%5Fcodelineno-18-1)disableTorch() => Promise<void>
`

Disable camera's torch (flash) during a scan session.

Only available on Android and iOS.

**Since:** 7.2.0

---

### toggleTorch()[¶](#toggletorch "Permanent link")

`[](#%5F%5Fcodelineno-19-1)toggleTorch() => Promise<void>
`

Toggle camera's torch (flash) during a scan session.

Only available on Android and iOS.

**Since:** 7.2.0

---

### isTorchEnabled()[¶](#istorchenabled "Permanent link")

`[](#%5F%5Fcodelineno-20-1)isTorchEnabled() => Promise<IsTorchEnabledResult>
`

Returns whether or not the camera's torch (flash) is enabled.

Only available on Android and iOS.

**Returns:** `Promise<[IsTorchEnabledResult](#istorchenabledresult)>`

**Since:** 7.2.0

---

### isTorchAvailable()[¶](#istorchavailable "Permanent link")

`[](#%5F%5Fcodelineno-21-1)isTorchAvailable() => Promise<IsTorchAvailableResult>
`

Returns whether or not the camera's torch (flash) is available.

Only available on Android and iOS.

**Returns:** `Promise<[IsTorchAvailableResult](#istorchavailableresult)>`

**Since:** 7.2.0

---

### setZoomRatio(...)[¶](#setzoomratio "Permanent link")

`[](#%5F%5Fcodelineno-22-1)setZoomRatio(options: SetZoomRatioOptions) => Promise<void>
`

Set the zoom ratio of the camera.

Only available on Android and iOS.

| Param       | Type                                        |
| ----------- | ------------------------------------------- |
| **options** | [SetZoomRatioOptions](#setzoomratiooptions) |

**Since:** 5.4.0

---

### getZoomRatio()[¶](#getzoomratio "Permanent link")

`[](#%5F%5Fcodelineno-23-1)getZoomRatio() => Promise<GetZoomRatioResult>
`

Get the zoom ratio of the camera.

Only available on Android and iOS.

**Returns:** `Promise<[GetZoomRatioResult](#getzoomratioresult)>`

**Since:** 5.4.0

---

### getMinZoomRatio()[¶](#getminzoomratio "Permanent link")

`[](#%5F%5Fcodelineno-24-1)getMinZoomRatio() => Promise<GetMinZoomRatioResult>
`

Get the minimum zoom ratio of the camera.

Only available on Android and iOS.

**Returns:** `Promise<[GetMinZoomRatioResult](#getminzoomratioresult)>`

**Since:** 5.4.0

---

### getMaxZoomRatio()[¶](#getmaxzoomratio "Permanent link")

`[](#%5F%5Fcodelineno-25-1)getMaxZoomRatio() => Promise<GetMaxZoomRatioResult>
`

Get the maximum zoom ratio of the camera.

Only available on Android and iOS.

**Returns:** `Promise<[GetMaxZoomRatioResult](#getmaxzoomratioresult)>`

**Since:** 5.4.0

---

### openSettings()[¶](#opensettings "Permanent link")

`[](#%5F%5Fcodelineno-26-1)openSettings() => Promise<void>
`

Open the settings of the app so that the user can grant the camera permission.

Only available on Android and iOS.

**Since:** 0.0.1

---

### isGoogleBarcodeScannerModuleAvailable()[¶](#isgooglebarcodescannermoduleavailable "Permanent link")

`[](#%5F%5Fcodelineno-27-1)isGoogleBarcodeScannerModuleAvailable() => Promise<IsGoogleBarcodeScannerModuleAvailableResult>
`

Check if the Google [Barcode](#barcode) Scanner module is available.

If the Google [Barcode](#barcode) Scanner module is not available, you can install it by using `installGoogleBarcodeScannerModule()`.

Only available on Android.

**Returns:** `Promise<[IsGoogleBarcodeScannerModuleAvailableResult](#isgooglebarcodescannermoduleavailableresult)>`

**Since:** 5.1.0

---

### installGoogleBarcodeScannerModule()[¶](#installgooglebarcodescannermodule "Permanent link")

`[](#%5F%5Fcodelineno-28-1)installGoogleBarcodeScannerModule() => Promise<void>
`

Install the Google [Barcode](#barcode) Scanner module.

**Attention**: This only starts the installation. The `googleBarcodeScannerModuleInstallProgress` event listener will notify you when the installation is complete.

Only available on Android.

**Since:** 5.1.0

---

### checkPermissions()[¶](#checkpermissions "Permanent link")

`[](#%5F%5Fcodelineno-29-1)checkPermissions() => Promise<PermissionStatus>
`

Check camera permission.

**Returns:** `Promise<[PermissionStatus](#permissionstatus)>`

**Since:** 0.0.1

---

### requestPermissions()[¶](#requestpermissions "Permanent link")

`[](#%5F%5Fcodelineno-30-1)requestPermissions() => Promise<PermissionStatus>
`

Request camera permission.

**Returns:** `Promise<[PermissionStatus](#permissionstatus)>`

**Since:** 0.0.1

---

### addListener('barcodesScanned', ...)[¶](#addlistenerbarcodesscanned "Permanent link")

`[](#%5F%5Fcodelineno-31-1)addListener(eventName: 'barcodesScanned', listenerFunc: (event: BarcodesScannedEvent) => void) => Promise<PluginListenerHandle>
`

Called when barcodes are scanned.

| Param            | Type                                                           |
| ---------------- | -------------------------------------------------------------- |
| **eventName**    | 'barcodesScanned'                                              |
| **listenerFunc** | (event: [BarcodesScannedEvent](#barcodesscannedevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 6.2.0

---

### addListener('scanError', ...)[¶](#addlistenerscanerror "Permanent link")

`[](#%5F%5Fcodelineno-32-1)addListener(eventName: 'scanError', listenerFunc: (event: ScanErrorEvent) => void) => Promise<PluginListenerHandle>
`

Called when an error occurs during the scan.

Available on Android and iOS.

| Param            | Type                                               |
| ---------------- | -------------------------------------------------- |
| **eventName**    | 'scanError'                                        |
| **listenerFunc** | (event: [ScanErrorEvent](#scanerrorevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('googleBarcodeScannerModuleInstallProgress', ...)[¶](#addlistenergooglebarcodescannermoduleinstallprogress "Permanent link")

`[](#%5F%5Fcodelineno-33-1)addListener(eventName: 'googleBarcodeScannerModuleInstallProgress', listenerFunc: (event: GoogleBarcodeScannerModuleInstallProgressEvent) => void) => Promise<PluginListenerHandle>
`

Called when the Google [Barcode](#barcode) Scanner module is installed.

Available on Android.

| Param            | Type                                                                                                               |
| ---------------- | ------------------------------------------------------------------------------------------------------------------ |
| **eventName**    | 'googleBarcodeScannerModuleInstallProgress'                                                                        |
| **listenerFunc** | (event: [GoogleBarcodeScannerModuleInstallProgressEvent](#googlebarcodescannermoduleinstallprogressevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 5.1.0

---

### removeAllListeners()[¶](#removealllisteners "Permanent link")

`[](#%5F%5Fcodelineno-34-1)removeAllListeners() => Promise<void>
`

Remove all listeners for this plugin.

**Since:** 0.0.1

---

### Interfaces[¶](#interfaces "Permanent link")

#### StartScanOptions[¶](#startscanoptions "Permanent link")

| Prop                               | Type                      | Description                                                                                                                                                                                                           | Default                  | Since |
| ---------------------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | ----- |
| **formats**                        | BarcodeFormat\[\]         | Improve the speed of the barcode scanner by configuring the barcode formats to scan for. Only available on Android and iOS.                                                                                           | 0.0.1                    |       |
| **lensFacing**                     | [LensFacing](#lensfacing) | Configure the camera (front or back) to use.                                                                                                                                                                          | 0.0.1                    |       |
| **resolution**                     | [Resolution](#resolution) | Configure the resolution of the captured image that is used for barcode scanning. If the resolution is not supported by the device, the closest supported resolution will be used. Only available on Android and iOS. | Resolution\['1280x720'\] | 7.0.0 |
| **enableMultitaskingCameraAccess** | boolean                   | Allow camera usage on iPad while in multitasking mode. Only available on iOS (16.0+).                                                                                                                                 | false                    | 7.5.0 |
| **videoElement**                   | HTMLVideoElement          | The HTML video element to use for the camera preview. Only available on web.                                                                                                                                          | 7.1.0                    |       |

#### ReadBarcodesFromImageResult[¶](#readbarcodesfromimageresult "Permanent link")

| Prop         | Type        | Description            | Since |
| ------------ | ----------- | ---------------------- | ----- |
| **barcodes** | Barcode\[\] | The detected barcodes. | 0.0.1 |

#### Barcode[¶](#barcode "Permanent link")

| Prop              | Type                                                                               | Description                                                                                                                                                                      | Since |
| ----------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **bytes**         | number\[\]                                                                         | Raw bytes as it was encoded in the barcode.                                                                                                                                      | 0.0.1 |
| **calendarEvent** | [BarcodeCalendarEvent](#barcodecalendarevent)                                      | Calendar event info.                                                                                                                                                             | 7.0.0 |
| **contactInfo**   | [BarcodeContactInfo](#barcodecontactinfo)                                          | Person's or organization's business card.                                                                                                                                        | 7.0.0 |
| **cornerPoints**  | \[\[number, number\], \[number, number\], \[number, number\], \[number, number\]\] | The four corner points of the barcode in clockwise order starting with top-left. This property is currently only supported by the startScan(...) method.                         | 0.0.1 |
| **displayValue**  | string                                                                             | The barcode value in a human readable format.                                                                                                                                    | 0.0.1 |
| **driverLicense** | [BarcodeDriverLicense](#barcodedriverlicense)                                      | Driver license or ID card.                                                                                                                                                       | 7.0.0 |
| **email**         | [BarcodeEmail](#barcodeemail)                                                      | An email message from a 'MAILTO:'.                                                                                                                                               | 7.0.0 |
| **format**        | [BarcodeFormat](#barcodeformat)                                                    | The barcode format.                                                                                                                                                              | 0.0.1 |
| **geoPoint**      | [BarcodeGeoPoint](#barcodegeopoint)                                                | GPS coordinates from a 'GEO:'.                                                                                                                                                   | 7.0.0 |
| **phone**         | [BarcodePhone](#barcodephone)                                                      | Phone number info.                                                                                                                                                               | 7.0.0 |
| **rawValue**      | string                                                                             | The barcode value in a machine readable format. This value is only available if the barcode is encoded in the UTF-8 character set. Otherwise, the bytes property should be used. | 0.0.1 |
| **sms**           | [BarcodeSms](#barcodesms)                                                          | A sms message from a 'SMS:'.                                                                                                                                                     | 7.0.0 |
| **urlBookmark**   | [BarcodeUrlBookmark](#barcodeurlbookmark)                                          | A URL and title from a 'MEBKM:'.                                                                                                                                                 | 7.0.0 |
| **valueType**     | [BarcodeValueType](#barcodevaluetype)                                              | The barcode value type.                                                                                                                                                          | 0.0.1 |
| **wifi**          | [BarcodeWifi](#barcodewifi)                                                        | A wifi network parameters from a 'WIFI:'.                                                                                                                                        | 7.0.0 |

#### BarcodeCalendarEvent[¶](#barcodecalendarevent "Permanent link")

| Prop            | Type   | Description                              | Since |
| --------------- | ------ | ---------------------------------------- | ----- |
| **description** | string | The event description.                   | 7.0.0 |
| **end**         | string | The event end date as ISO 8601 string.   | 7.0.0 |
| **location**    | string | The event location.                      | 7.0.0 |
| **organizer**   | string | The event organizer.                     | 7.0.0 |
| **start**       | string | The event start date as ISO 8601 string. | 7.0.0 |
| **status**      | string | The event status.                        | 7.0.0 |
| **summary**     | string | The event summary.                       | 7.0.0 |

#### BarcodeContactInfo[¶](#barcodecontactinfo "Permanent link")

| Prop             | Type                      | Description                 | Since |
| ---------------- | ------------------------- | --------------------------- | ----- |
| **addresses**    | Address\[\]               | The contact's addresses.    | 7.0.0 |
| **emails**       | BarcodeEmail\[\]          | The contact's emails.       | 7.0.0 |
| **personName**   | [PersonName](#personname) | The contact's name.         | 7.0.0 |
| **organization** | string                    | The contact's organization. | 7.0.0 |
| **phones**       | BarcodePhone\[\]          | The contact's phones.       | 7.0.0 |
| **title**        | string                    | The contact's title.        | 7.0.0 |
| **urls**         | string\[\]                | The contact's urls.         | 7.0.0 |

#### Address[¶](#address "Permanent link")

| Prop             | Type                        | Description                                         | Since |
| ---------------- | --------------------------- | --------------------------------------------------- | ----- |
| **addressLines** | string\[\]                  | Formatted address, multiple lines when appropriate. | 7.0.0 |
| **type**         | [AddressType](#addresstype) | [Address](#address) type.                           | 7.0.0 |

#### BarcodeEmail[¶](#barcodeemail "Permanent link")

| Prop        | Type                                | Description             | Since |
| ----------- | ----------------------------------- | ----------------------- | ----- |
| **address** | string                              | The email address.      | 7.0.0 |
| **body**    | string                              | The email body.         | 7.0.0 |
| **subject** | string                              | The email subject.      | 7.0.0 |
| **type**    | [EmailFormatType](#emailformattype) | The email address type. | 7.0.0 |

#### PersonName[¶](#personname "Permanent link")

| Prop              | Type   | Description                                                                          | Since |
| ----------------- | ------ | ------------------------------------------------------------------------------------ | ----- |
| **first**         | string | First name.                                                                          | 7.0.0 |
| **formattedName** | string | The formatted name.                                                                  | 7.0.0 |
| **last**          | string | Last name.                                                                           | 7.0.0 |
| **middle**        | string | Middle name.                                                                         | 7.0.0 |
| **prefix**        | string | Name prefix.                                                                         | 7.0.0 |
| **pronunciation** | string | Text string to be set as the kana name in the phonebook. Used for Japanese contacts. | 7.0.0 |
| **suffix**        | string | Name suffix.                                                                         | 7.0.0 |

#### BarcodePhone[¶](#barcodephone "Permanent link")

| Prop       | Type                                | Description            | Since |
| ---------- | ----------------------------------- | ---------------------- | ----- |
| **number** | string                              | The phone number.      | 7.0.0 |
| **type**   | [PhoneFormatType](#phoneformattype) | The phone number type. | 7.0.0 |

#### BarcodeDriverLicense[¶](#barcodedriverlicense "Permanent link")

| Prop               | Type   | Description                                        | Since |
| ------------------ | ------ | -------------------------------------------------- | ----- |
| **addressCity**    | string | City of holder's address.                          | 7.0.0 |
| **addressState**   | string | State of holder's address.                         | 7.0.0 |
| **addressStreet**  | string | Street of holder's address.                        | 7.0.0 |
| **addressZip**     | string | Postal code of holder's address.                   | 7.0.0 |
| **birthDate**      | string | Birthdate of the holder.                           | 7.0.0 |
| **documentType**   | string | "DL" for driver's licenses, "ID" for ID cards.     | 7.0.0 |
| **expiryDate**     | string | Expiration date of the license.                    | 7.0.0 |
| **firstName**      | string | Holder's first name.                               | 7.0.0 |
| **gender**         | string | Holder's gender.                                   | 7.0.0 |
| **issueDate**      | string | Issue date of the license.                         | 7.0.0 |
| **issuingCountry** | string | ISO 3166-1 alpha-3 code in which DL/ID was issued. | 7.0.0 |
| **lastName**       | string | Holder's last name.                                | 7.0.0 |
| **licenseNumber**  | string | Driver license ID number.                          | 7.0.0 |
| **middleName**     | string | Holder's middle name.                              | 7.0.0 |

#### BarcodeGeoPoint[¶](#barcodegeopoint "Permanent link")

| Prop          | Type   | Description | Since |
| ------------- | ------ | ----------- | ----- |
| **latitude**  | number | Latitude.   | 7.0.0 |
| **longitude** | number | Longitude.  | 7.0.0 |

#### BarcodeSms[¶](#barcodesms "Permanent link")

| Prop            | Type   | Description                     | Since |
| --------------- | ------ | ------------------------------- | ----- |
| **phoneNumber** | string | The phone number of the sms.    | 7.0.0 |
| **message**     | string | The message content of the sms. | 7.0.0 |

#### BarcodeUrlBookmark[¶](#barcodeurlbookmark "Permanent link")

| Prop      | Type   | Description                | Since |
| --------- | ------ | -------------------------- | ----- |
| **url**   | string | The URL of the bookmark.   | 7.0.0 |
| **title** | string | The title of the bookmark. | 7.0.0 |

#### BarcodeWifi[¶](#barcodewifi "Permanent link")

| Prop               | Type                                      | Description                   | Since |
| ------------------ | ----------------------------------------- | ----------------------------- | ----- |
| **encryptionType** | [WifiEncryptionType](#wifiencryptiontype) | Encryption type of the WI-FI. | 7.0.0 |
| **password**       | string                                    | Password of the WI-FI.        | 7.0.0 |
| **ssid**           | string                                    | SSID of the WI-FI.            | 7.0.0 |

#### ReadBarcodesFromImageOptions[¶](#readbarcodesfromimageoptions "Permanent link")

| Prop        | Type              | Description                                                                              | Since |
| ----------- | ----------------- | ---------------------------------------------------------------------------------------- | ----- |
| **blob**    | Blob              | The blob instance of the image file. Only available on Web.                              | 7.4.0 |
| **formats** | BarcodeFormat\[\] | Improve the speed of the barcode scanner by configuring the barcode formats to scan for. | 0.0.1 |
| **path**    | string            | The local path to the image file. Only available on Android and iOS.                     | 0.0.1 |

#### ScanResult[¶](#scanresult "Permanent link")

| Prop         | Type        | Description            | Since |
| ------------ | ----------- | ---------------------- | ----- |
| **barcodes** | Barcode\[\] | The detected barcodes. | 0.0.1 |

#### ScanOptions[¶](#scanoptions "Permanent link")

| Prop         | Type              | Description                                                                              | Since |
| ------------ | ----------------- | ---------------------------------------------------------------------------------------- | ----- |
| **formats**  | BarcodeFormat\[\] | Improve the speed of the barcode scanner by configuring the barcode formats to scan for. | 0.0.1 |
| **autoZoom** | boolean           | Toggle the auto zoom feature.                                                            | 7.4.0 |

#### IsSupportedResult[¶](#issupportedresult "Permanent link")

| Prop          | Type    | Description                                                                             | Since |
| ------------- | ------- | --------------------------------------------------------------------------------------- | ----- |
| **supported** | boolean | Whether or not the barcode scanner is supported by checking if the device has a camera. | 0.0.1 |

#### IsTorchEnabledResult[¶](#istorchenabledresult "Permanent link")

| Prop        | Type    | Description                          | Since |
| ----------- | ------- | ------------------------------------ | ----- |
| **enabled** | boolean | Whether or not the torch is enabled. | 0.0.1 |

#### IsTorchAvailableResult[¶](#istorchavailableresult "Permanent link")

| Prop          | Type    | Description                            | Since |
| ------------- | ------- | -------------------------------------- | ----- |
| **available** | boolean | Whether or not the torch is available. | 0.0.1 |

#### SetZoomRatioOptions[¶](#setzoomratiooptions "Permanent link")

| Prop          | Type   | Description            | Since |
| ------------- | ------ | ---------------------- | ----- |
| **zoomRatio** | number | The zoom ratio to set. | 5.4.0 |

#### GetZoomRatioResult[¶](#getzoomratioresult "Permanent link")

| Prop          | Type   | Description     | Since |
| ------------- | ------ | --------------- | ----- |
| **zoomRatio** | number | The zoom ratio. | 5.4.0 |

#### GetMinZoomRatioResult[¶](#getminzoomratioresult "Permanent link")

| Prop          | Type   | Description             | Since |
| ------------- | ------ | ----------------------- | ----- |
| **zoomRatio** | number | The minimum zoom ratio. | 5.4.0 |

#### GetMaxZoomRatioResult[¶](#getmaxzoomratioresult "Permanent link")

| Prop          | Type   | Description             | Since |
| ------------- | ------ | ----------------------- | ----- |
| **zoomRatio** | number | The maximum zoom ratio. | 5.4.0 |

#### IsGoogleBarcodeScannerModuleAvailableResult[¶](#isgooglebarcodescannermoduleavailableresult "Permanent link")

| Prop          | Type    | Description                                                                | Since |
| ------------- | ------- | -------------------------------------------------------------------------- | ----- |
| **available** | boolean | Whether or not the Google [Barcode](#barcode) Scanner module is available. | 5.1.0 |

#### PermissionStatus[¶](#permissionstatus "Permanent link")

| Prop       | Type                                            | Since |
| ---------- | ----------------------------------------------- | ----- |
| **camera** | [CameraPermissionState](#camerapermissionstate) | 0.0.1 |

#### PluginListenerHandle[¶](#pluginlistenerhandle "Permanent link")

| Prop       | Type                |
| ---------- | ------------------- |
| **remove** | () => Promise<void> |

#### BarcodesScannedEvent[¶](#barcodesscannedevent "Permanent link")

| Prop         | Type        | Description            | Since |
| ------------ | ----------- | ---------------------- | ----- |
| **barcodes** | Barcode\[\] | The detected barcodes. | 6.2.0 |

#### ScanErrorEvent[¶](#scanerrorevent "Permanent link")

| Prop        | Type   | Description        | Since |
| ----------- | ------ | ------------------ | ----- |
| **message** | string | The error message. | 0.0.1 |

#### GoogleBarcodeScannerModuleInstallProgressEvent[¶](#googlebarcodescannermoduleinstallprogressevent "Permanent link")

| Prop         | Type                                                                              | Description                                                    | Since |
| ------------ | --------------------------------------------------------------------------------- | -------------------------------------------------------------- | ----- |
| **state**    | [GoogleBarcodeScannerModuleInstallState](#googlebarcodescannermoduleinstallstate) | The current state of the installation.                         | 5.1.0 |
| **progress** | number                                                                            | The progress of the installation in percent between 0 and 100. | 5.1.0 |

### Type Aliases[¶](#type-aliases "Permanent link")

#### CameraPermissionState[¶](#camerapermissionstate "Permanent link")

`[PermissionState](#permissionstate) | 'limited'`

#### PermissionState[¶](#permissionstate "Permanent link")

`'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'`

### Enums[¶](#enums "Permanent link")

#### BarcodeFormat[¶](#barcodeformat "Permanent link")

| Members        | Value          | Description                        | Since |
| -------------- | -------------- | ---------------------------------- | ----- |
| **Aztec**      | 'AZTEC'        | Only available on Android and iOS. | 0.0.1 |
| **Codabar**    | 'CODABAR'      | Only available on Android and iOS. | 0.0.1 |
| **Code39**     | 'CODE\_39'     | Only available on Android and iOS. | 0.0.1 |
| **Code93**     | 'CODE\_93'     | Only available on Android and iOS. | 0.0.1 |
| **Code128**    | 'CODE\_128'    | Only available on Android and iOS. | 0.0.1 |
| **DataMatrix** | 'DATA\_MATRIX' | Only available on Android and iOS. | 0.0.1 |
| **Ean8**       | 'EAN\_8'       | Only available on Android and iOS. | 0.0.1 |
| **Ean13**      | 'EAN\_13'      | Only available on Android and iOS. | 0.0.1 |
| **Itf**        | 'ITF'          | Only available on Android and iOS. | 0.0.1 |
| **Pdf417**     | 'PDF\_417'     | Only available on Android and iOS. | 0.0.1 |
| **QrCode**     | 'QR\_CODE'     | Only available on Android and iOS. | 0.0.1 |
| **UpcA**       | 'UPC\_A'       | Only available on Android and iOS. | 0.0.1 |
| **UpcE**       | 'UPC\_E'       | Only available on Android and iOS. | 0.0.1 |

#### LensFacing[¶](#lensfacing "Permanent link")

| Members   | Value   | Since |
| --------- | ------- | ----- |
| **Front** | 'FRONT' | 0.0.1 |
| **Back**  | 'BACK'  | 0.0.1 |

#### Resolution[¶](#resolution "Permanent link")

| Members         | Value | Since |
| --------------- | ----- | ----- |
| **'640x480'**   | 0     | 7.0.0 |
| **'1280x720'**  | 1     | 7.0.0 |
| **'1920x1080'** | 2     | 7.0.0 |
| **'3840x2160'** | 3     | 7.2.0 |

#### AddressType[¶](#addresstype "Permanent link")

| Members     | Value | Since |
| ----------- | ----- | ----- |
| **HOME**    | 0     | 7.0.0 |
| **UNKNOWN** | 1     | 7.0.0 |
| **WORK**    | 2     | 7.0.0 |

#### EmailFormatType[¶](#emailformattype "Permanent link")

| Members     | Value | Since |
| ----------- | ----- | ----- |
| **HOME**    | 0     | 7.0.0 |
| **UNKNOWN** | 1     | 7.0.0 |
| **WORK**    | 2     | 7.0.0 |

#### PhoneFormatType[¶](#phoneformattype "Permanent link")

| Members     | Value | Since |
| ----------- | ----- | ----- |
| **FAX**     | 0     | 7.0.0 |
| **HOME**    | 1     | 7.0.0 |
| **MOBILE**  | 2     | 7.0.0 |
| **UNKNOWN** | 3     | 7.0.0 |
| **WORK**    | 4     | 7.0.0 |

#### BarcodeValueType[¶](#barcodevaluetype "Permanent link")

| Members            | Value              | Since |
| ------------------ | ------------------ | ----- |
| **CalendarEvent**  | 'CALENDAR\_EVENT'  | 0.0.1 |
| **ContactInfo**    | 'CONTACT\_INFO'    | 0.0.1 |
| **DriversLicense** | 'DRIVERS\_LICENSE' | 0.0.1 |
| **Email**          | 'EMAIL'            | 0.0.1 |
| **Geo**            | 'GEO'              | 0.0.1 |
| **Isbn**           | 'ISBN'             | 0.0.1 |
| **Phone**          | 'PHONE'            | 0.0.1 |
| **Product**        | 'PRODUCT'          | 0.0.1 |
| **Sms**            | 'SMS'              | 0.0.1 |
| **Text**           | 'TEXT'             | 0.0.1 |
| **Url**            | 'URL'              | 0.0.1 |
| **Wifi**           | 'WIFI'             | 0.0.1 |
| **Unknown**        | 'UNKNOWN'          | 0.0.1 |

#### WifiEncryptionType[¶](#wifiencryptiontype "Permanent link")

| Members  | Value | Since |
| -------- | ----- | ----- |
| **OPEN** | 1     | 7.0.0 |
| **WEP**  | 2     | 7.0.0 |
| **WPA**  | 3     | 7.0.0 |

#### GoogleBarcodeScannerModuleInstallState[¶](#googlebarcodescannermoduleinstallstate "Permanent link")

| Members              | Value | Since |
| -------------------- | ----- | ----- |
| **UNKNOWN**          | 0     | 5.1.0 |
| **PENDING**          | 1     | 5.1.0 |
| **DOWNLOADING**      | 2     | 5.1.0 |
| **CANCELED**         | 3     | 5.1.0 |
| **COMPLETED**        | 4     | 5.1.0 |
| **FAILED**           | 5     | 5.1.0 |
| **INSTALLING**       | 6     | 5.1.0 |
| **DOWNLOAD\_PAUSED** | 7     | 5.1.0 |

## Terms & Privacy[¶](#terms-privacy "Permanent link")

This plugin uses the [Google ML Kit](https://developers.google.com/ml-kit):

* [Terms & Privacy](https://developers.google.com/ml-kit/terms)
* [Android Data Disclosure](https://developers.google.com/ml-kit/android-data-disclosure)
* [iOS Data Disclosure](https://developers.google.com/ml-kit/ios-data-disclosure)

## Changelog[¶](#changelog "Permanent link")

See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-mlkit/blob/main/packages/barcode-scanning/CHANGELOG.md).

## License[¶](#license "Permanent link")

See [LICENSE](https://github.com/capawesome-team/capacitor-mlkit/blob/main/packages/barcode-scanning/LICENSE).

---

1. This project is not affiliated with, endorsed by, sponsored by, or approved by Google LLC or any of their affiliates or subsidiaries. [↩](#fnref:1 "Jump back to footnote 1 in the text")
2. `QR Code` is a registered trademark of DENSO WAVE INCORPORATED. [↩](#fnref:2 "Jump back to footnote 2 in the text")

May 17, 2026 

 Back to top 