Give us a call
Call us at +41 41 555 20 40
SCAN SDK has been trained to recognize European car number plates.
Linear product | Linear industrial | Matrix |
UPC-A | Code 39 | QR Code |
UPC-E | Code 93 | Micro QR Code |
EAN-8 | Code 128 | rMQR Code |
EAN-13 | Codabar | Aztec |
DataBar | DataBar Expanded | Data Matrix |
DX Film Edge | PDF417 | |
ITF | MaxiCode (partial) | |
Visible Digital Seals |
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'
}
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
}
}
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.
The ScanType
enum specifies the type of result contained in each ScanResult
object. The possible types are:
Copyright 2024 OVD Kinegram AG
https://github.com/opencv/opencv
Apache License Version 2.0
https://github.com/tensorflow/tensorflow
Apache License Version 2.0
https://github.com/zxing-cpp/zxing-cpp
Apache License Version 2.0
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.
Give us a call
Call us at +41 41 555 20 40
Contact by e-mail
Contact us via our contact form.
Personal meeting
Arrange a personal meeting.