Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

io-anyline-cordova

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

io-anyline-cordova

The cordova plugin for the Anyline SDK

  • 3.13.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
99
increased by6.45%
Maintainers
1
Weekly downloads
 
Created
Source

Anyline SDK Cordova Plugin

Anyline provides an easy-to-use SDK for applications to enable Optical Character Recognition (OCR) on mobile devices.

Available Modules

  • Barcode: Scan 23 types of international barcode & QR code formats.
  • Energy: Scan meter readings of various electric, gas, and water meters.
  • MRZ: Reliable scanning of data from passports' and IDs' machine readable zones (MRZ)
  • Anyline OCR: Create a custom use case with LINE or GRID recognition

Requirements

Android
  • Android device with SDK >= 15
  • decent camera functionality (recommended: 720p and adequate auto focus)
iOS
  • minimum iOS 8.2
  • minimum iPhone4s

Quick Start - Setup

This is just a simple setup guide to integrate the anylinesdk-plugin in an existing Cordova project.
For more information about Cordova, how to use plugins, etc. see https://cordova.apache.org/.

1. Add the anylinesdk-plugin to your existing cordova project
cordova plugin add io-anyline-cordova

Or use plugman. E.g. for android:

plugman install --platform android --project platforms/android --plugin io-anyline-cordova

If you'd like to clone the repository you will have to use git-lfs. Use the following commands to install git-lfs.

brew install git-lfs
git lfs install

If you prefer downloading a package, use the provided zip package on the releases page. Be aware that the github download zip button does not work for projects with git-lfs.

2. Plugin Usage
cordova.exec(onResult, onError, "AnylineSDK", scanMode, config);
  • onResult: a function that is called on a scan result
  • onError: a function that is called on error or when the user canceled the scanning
  • AnylineSDK: add this string to make sure the anyline-sdk plugin is called
  • scanMode: "MRZ", "BARCODE", "ANYLINE_OCR", "ELECTRIC_METER", "GAS_METER" (more Energy modes can be found here)
  • config: an array
    • config[0]: the license key
    • config[1]: the view config
    • config[2]: the ocr config (only uses with mode ANYLINE_OCR)

Example for config from MRZ:

[
    "YOUR_LICENSE_KEY",
    {
        "captureResolution": "1080p",
        "cutout": {
            "style": "rect",
            "maxWidthPercent": "90%",
            "maxHeightPercent": "90%",
            "alignment": "top_half",
            "strokeWidth": 2,
            "cornerRadius": 4,
            "strokeColor": "FFFFFF",
            "outerColor": "000000",
            "outerAlpha": 0.3
        },
        "flash": {
            "mode": "manual",
            "alignment": "bottom_right"
        },
        "beepOnResult": true,
        "vibrateOnResult": true,
        "blinkAnimationOnResult": true,
        "cancelOnResult": true
    }
]
3. Run your cordova project: Enjoy scanning and have fun :)

Checkout our online documentation for more details.

License

See LICENSE file.

Keywords

FAQs

Package last updated on 09 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc