Giter Club home page Giter Club logo

capacitor-barcode-scanner's Introduction

@capacitor/barcode-scanner

Capacitor plugin using Outsystems Barcode libs

Install

npm install @capacitor/barcode-scanner
npx cap sync

Android

You will need to modify the allprojects > repositories section in your android/build.gradle file to include the Outsystems repository. Your android/build.gradle file should look similar to this after adding the repository.

allprojects {
    repositories {
        google()
        mavenCentral()
        maven {
            url 'https://pkgs.dev.azure.com/OutSystemsRD/9e79bc5b-69b2-4476-9ca5-d67594972a52/_packaging/PublicArtifactRepository/maven/v1'
            name 'Azure'
            credentials {
                username = "optional"
                password = ""
            }
            content {
                includeGroup "com.github.outsystems"
            }
        }
    }
}

API

Interface defining the contract for a plugin capable of scanning barcodes. Requires implementation of the scanBarcode method, which initiates a barcode scan with given options.

scanBarcode(...)

scanBarcode(options: CapacitorBarcodeScannerOptions) => Promise<CapacitorBarcodeScannerScanResult>
Param Type
options CapacitorBarcodeScannerOptions

Returns: Promise<CapacitorBarcodeScannerScanResult>


Type Aliases

CapacitorBarcodeScannerScanResult

Defines the structure of the result returned from a barcode scan.

{ ScanResult: string }

CapacitorBarcodeScannerOptions

Defines the options for configuring a barcode scan.

{ hint: CapacitorBarcodeScannerTypeHint, scanInstructions?: string, scanButton?: boolean, scanText?: string, cameraDirection?: CapacitorBarcodeScannerCameraDirection, scanOrientation?: CapacitorBarcodeScannerScanOrientation, android?: { scanningLibrary?: CapacitorBarcodeScannerAndroidScanningLibrary, }, web?: { showCameraSelection?: boolean, scannerFPS?: number } }

CapacitorBarcodeScannerTypeHint

Extends supported formats from Html5Qrcode with a special 'ALL' option, indicating support for all barcode types. Type definition combining Html5QrcodeSupportedFormats and OSBarcodeTypeHintALLOption to represent the hint for the type of barcode to be scanned.

Html5QrcodeSupportedFormats | CapacitorBarcodeScannerTypeHintALLOption

Enums

Html5QrcodeSupportedFormats

Members Value
QR_CODE 0
AZTEC 1
CODABAR 2
CODE_39 3
CODE_93 4
CODE_128 5
DATA_MATRIX 6
MAXICODE 7
ITF 8
EAN_13 9
EAN_8 10
PDF_417 11
RSS_14 12
RSS_EXPANDED 13
UPC_A 14
UPC_E 15
UPC_EAN_EXTENSION 16

CapacitorBarcodeScannerTypeHintALLOption

Members Value
ALL 17

CapacitorBarcodeScannerCameraDirection

Members Value
BACK 1
FRONT 2

CapacitorBarcodeScannerScanOrientation

Members Value
PORTRAIT 1
LANDSCAPE 2
ADAPTIVE 3

CapacitorBarcodeScannerAndroidScanningLibrary

Members Value
ZXING 'zxing'
MLKIT 'mlkit'

capacitor-barcode-scanner's People

Contributors

it-mikes avatar itschaced avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

startupfuture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.