Skip to content

A barcode scanner app in Ionic Framework using capacitor

Notifications You must be signed in to change notification settings

IKTIKN/ionic-barcode-scanner

Repository files navigation

ionic-barcode-scanner

This is a cross-platform demo app built in Ionic Framework. It demonstrates the barcode scanner feature using the capacitor community plugin barcode-scanner.

Features

  • Scanner
  • Flashlight
  • Haptic feedback
  • Native camera permission
  • Copy data to clipboard by tapping scanresult

Supported protocols

This app scans more than just barcodes, see the table below for all supported protocols on Android and IOS:

Category Type Android iOS
1D Product
UPC_A
UPC_E
UPC_EAN_EXTENSION
EAN_8
EAN_13
1D Industrial
CODE_39
CODE_39_MOD_43
CODE_93
CODE_128
CODABAR
ITF
ITF_14
2D
AZTEC
DATA_MATRIX
MAXICODE
PDF_417
QR_CODE
RSS_14
RSS_EXPANDED

Installation

Developers

Clone this project to your favorite directory and install the dependencies.

$ git clone https://github.com/IKTIKN/ionic-barcode-scanner.git
$ cd ionic-barcode-scanner
$ npm install

Native

The android platform has already been added to capacitor. For IOS support, add the platform to capacitor

$ npm install @capacitor/ios
$ npx cap add ios

Open the project in Android Studio or Xcode

$ npx cap open android
$ npx cap open ios

Users

A signed APK is available for Android devices. Make sure to grant permission to install apps from untrusted sources on your device!

Or build it yourself. Open the project in Android Studio and generate a signed APK or AAP.

Build > Generate Signed Bundle / APK