Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/prongbang/scannerview

Simple QR & Barcode scanning library for Android
https://github.com/prongbang/scannerview

android barcode barcode-scanner qrcode qrcode-scanner

Last synced: 14 days ago
JSON representation

Simple QR & Barcode scanning library for Android

Awesome Lists containing this project

README

        

# Simple ZXing Scanner View

Simple QR & Barcode scanning library for Android, based on the [ZXing](https://github.com/zxing/zxing/), [ZXing Android Embedded](https://github.com/journeyapps/zxing-android-embedded), [Barcode Scanner](https://github.com/dm77/barcodescanner) for decoding.

## Installation

- Add the following repositories to your `project/build.gradle` file.

```groovy
repositories {
maven { url 'https://jitpack.io' }
}
```

- Add the following dependency to your `project/app/build.gradle` file.

```groovy
dependencies {
implementation 'com.github.prongbang:scannerview:1.1.0'
}
```

## Usage

- Add camera permission to your AndroidManifest.xml file:

```xml

```

- Add ScannerView to xxx_layout.xml file:

```xml

```

- Add on Activity file:

```kotlin
private fun startScanner() {
scannerView?.apply {
addObserver(this)
onResultListener {
Toast.makeText(this, it, Toast.LENGTH_SHORT).show()
}
}
}

private fun restartScanner() {
scannerView?.resumeScannerView()
}
```