# Scanner (QR/Barcode)

* [Bubble.io Plugin](#bubble.io-plugin)
* [JavaScript SDK](#javascript-sdk)

Supported QR/Barcode formats:

| 1D product            | 1D industrial | 2D           |
| --------------------- | ------------- | ------------ |
| UPC-A                 | Code 39       | QR Code      |
| UPC-E                 | Code 93       | Data Matrix  |
| EAN-8                 | Code 128      | Aztec        |
| EAN-13                | Codabar       | PDF 417      |
| UPC/EAN Extension 2/5 | ITF           | MaxiCode     |
|                       |               | RSS-14       |
|                       |               | RSS-Expanded |

{% hint style="info" %}
The number of symbols in a barcode directly impacts the camera resolution required to scan it successfully. Barcodes with a higher density of symbols will generally need a higher resolution camera for accurate reading.
{% endhint %}

### 🧋 Bubble.io Plugin

#### \[Element] Natively - Scanner (QR/Barcode Scanner)

#### Events:

* Scanner Result Updated

#### States:

* Scanner Result - text

#### Actions:

* Show Scanner

### 🛠 JavaScript SDK

#### NativelyScanner

{% code overflow="wrap" lineNumbers="true" %}

```javascript
const scanner = new NativelyScanner()
const open_scanner_callback = function (resp) {
    console.log(resp.result); // result as string representation
};
scanner.showScanner(open_scanner_callback);
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.buildnatively.com/guides/integration/scanner-qr-barcode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
