npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bpw-barcode-scanner

v1.1.0

Published

Capacitor plugin using Outsystems Barcode libs

Downloads

355

Readme

@capacitor/barcode-scanner

Capacitor plugin using Outsystems Barcode libs

Install

npm install @capacitor/barcode-scanner
npx cap sync

Android

The barcode scanner plugin requires a minimum Android SDK target of 26. This is higher than the default that comes with your Capacitor application. You can update this value in your android/variables.gradle file.

ext {
    minSdkVersion = 26
}

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"
            }
        }
    }
}

iOS

The barcode scanner uses the camera on the device. Ensure you configure the Privacy - Camera Usage Description in your Info.plist file so that your application can access the device's camera.


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' |