VIN
What is a VIN? #
A VIN (Vehicle Identification Number) is a unique code used to identify individual motor vehicles. It consists of 17 characters, which include both digits and capital letters, and it provides information about the vehicle's manufacturer, model, and serial number.
The VIN (Vehicle Identification Number) feature is designed to scan barcodes specific to vehicle identification.
How to enable VIN on Android? #
It can be enabled either via a pre-defined template or manually.
For the pre-defined template, the system's BarkoderHelper applies the VIN template to the configuration.
For manual setup, the system enables:
☑ Code39,
☑ Code128,
☑ DataMatrix,
☑ QR
decoding because all of those barcode types can be used as VIN.
In both methods, the license key must be valid, otherwise, the results will be marked (Unlicensed).
Set it via pre-defined template: #
private fun setVinMode() {
bkdView.config = BarkoderConfig(this, "LICENSE_KEY") {
Log.i("Licensing SDK: ", it.message)
}
BarkoderHelper.applyConfigSettingsFromTemplate(this, bkdView.config, BarkoderConfigTemplate.VIN,
object : BarkoderConfigCallback { // This is sync callback
override fun onSuccess() {
bkdView.config.isRegionOfInterestVisible = true
bkdView.config.setRegionOfInterest(0f, 30f, 100f, 40f)
}
override fun onFail(p0: BarkoderException?) {
TODO("Not yet implemented")
}
})
}
Set it manually: #
private fun setVinMode() {
bkdView.config = BarkoderConfig(this, "LICENSE_KEY") {
Log.i("Licensing SDK: ", it.message)
}
// Enabling code39, code128, datamatrix and qr
bkdView.config.decoderConfig.Code39.enabled = true
bkdView.config.decoderConfig.Code128.enabled = true
bkdView.config.decoderConfig.Datamatrix.enabled = true
bkdView.config.decoderConfig.QR.enabled = true
// For best result decoding speed should be slow, and barkoder resolution should be high
bkdView.config?.decoderConfig?.decodingSpeed = Barkoder.DecodingSpeed.Slow
bkdView.config?.barkoderResolution = BarkoderResolution.HIGH
bkdView.config.isRegionOfInterestVisible = true
bkdView.config.setRegionOfInterest(0f, 30f, 100f, 40f)
bkdView.config.decoderConfig.enableVINRestrictions = true
}