SCAN SDK Android

The SCAN SDK is a powerful SDK that enables developers to integrate scanning functionalities into their Android applications.

The SCAN SDK supports the scanning of various objects, such as

  • machine readable zones (MRZ) on ID cards and passports,
  • number plates,
  • barcodes and
  • intenational driver’s licenses (IDL).

Supported Number Plates

SCAN SDK has been trained to recognize European car number plates.

Supported Barcode Formats

Linear productLinear industrialMatrix
UPC-ACode 39QR Code
UPC-ECode 93Micro QR Code
EAN-8Code 128rMQR Code
EAN-13CodabarAztec
DataBarDataBar ExpandedData Matrix
DX Film EdgePDF417
ITFMaxiCode (partial)
Visible Digital Seals

Preconditions

  • Android 8.0 (API level 26)

Usage

Importing

In your top level build.gradle:

allprojects {
	repositories {
		google()
		mavenCentral()
		maven {
			url 'https://git.kurzdigital.com/api/v4/projects/1700/packages/maven'
			credentials {
				username 'XXX'
				password 'XXX'
			}
		}
	}
}

In your app build.gradle:

dependencies {
	// ...
	implementation 'com.kinegram.android:scansdk:0.6.0'
}

Quick Start

Then just use startActivityForResult() to start the ScanActivity like this:

package com.kinegram.android.scansdk.demo

import android.app.Activity
import android.app.AlertDialog
import android.content.Intent
import android.os.Bundle
import android.view.View
import com.kinegram.android.scansdk.Scanner
import com.kinegram.android.scansdk.activity.ScanActivity
import com.kinegram.android.scansdk.activity.ScanActivity.Companion.getScanResults

class MainActivity : Activity() {
	override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
		if (requestCode != SCAN_RESULT || resultCode != RESULT_OK) {
			return
		}
		val results = data?.getScanResults() ?: return
		val message = results.joinToString("\n") { result ->
			"${result.type}:\n${
				when (result.type) {
					Scanner.ScanType.Barcode -> "${result.text}\n${result.format}"
					Scanner.ScanType.MRZ -> result.mrz?.toString()
					Scanner.ScanType.IDL -> result.idl?.toString()
					Scanner.ScanType.NumberPlate -> result.numberPlate?.toString()
					else -> result.text
				}
			}"
		}
		AlertDialog.Builder(this)
			.setMessage(message)
			.create()
			.show()
	}

	override fun onCreate(state: Bundle?) {
		super.onCreate(state)
		setContentView(R.layout.activity_main)

		findViewById(R.id.scan).apply {
			setOnClickListener {
				startActivityForResult(
					Intent(this@MainActivity, ScanActivity::class.java),
					SCAN_RESULT
				)
			}
		}
	}

	companion object {
		private const val SCAN_RESULT = 1
	}
}

ScanResult

A list of ScanResult objects is returned in onActivityResult(). Each ScanResult object contains the recognized data from the scan, along with its type, which is defined by the ScanType enum.

ScanType

The ScanType enum specifies the type of result contained in each ScanResult object. The possible types are:

  • BARCODE: Indicates that the result is a barcode.
  • MRZ: Indicates that the result is a Machine Readable Zone (MRZ) from a document.
  • NUMBER_PLATE: Indicates that the result is a number plate.
  • IDL: Indicates that the result is an international driver’s license.

License

Kinegram Scan SDK

Copyright 2024 OVD Kinegram AG

https://www.kinegram.com/

This product includes software developed by:

OpenCV

https://github.com/opencv/opencv

Apache License Version 2.0

TensorFlow

https://github.com/tensorflow/tensorflow

Apache License Version 2.0

ZXingCpp

https://github.com/zxing-cpp/zxing-cpp

Apache License Version 2.0

Support

If you encounter any issues or have any questions,we encourage you to open an issue in the GitHub issue tracker. Our team will be happy to assist you and address any problems you may have. Alternatively, you can contact us at digitalsolutions@kinegram.com.

Privacy Notice

Get more information about the
SCAN SDK Android

Contact

    First Name *

    Last Name *

    Company *

    Position

    E-Mail *

    Phone *

    Message *

    *

    I agree that my data from the contact form will be collected to answer my request and for marketing and sales purposes. You can find more information in our privacy policy.