cover

Android DPM Mode Example

What is DPM Mode for Android? #

Direct Part Marking (DPM) mode is a feature designed to scan barcodes that are directly marked on an item, usually etched or printed onto a surface, instead of printed on a paper label. This mode is particularly useful in industries where items need to be tracked throughout their lifespan. To enable DPM mode, the DataMatrix decoding is enabled and the DPM mode is set to 1. For best results, the decoding speed is set to slow and the barKoder resolution is set to high. A Region of Interest (ROI) is also set to optimize the viewfinder for scanning.

How to enable DPM Mode? #

Enabling via pre-defined template:

                private fun setDpmMode() {
    bkdView.config = BarkoderConfig(this, "LICENSE_KEY") {
        Log.i("Licensing SDK: ", it.message)
    }

    bkdView.config.decoderConfig.Datamatrix.enabled = true
    bkdView.config.decoderConfig.Datamatrix.dpmMode = true

    bkdView.config.decoderConfig.decodingSpeed = Barkoder.DecodingSpeed.Normal
    bkdView.config.barkoderResolution = BarkoderResolution.HIGH

    bkdView.config.setRegionOfInterest(35f, 40f, 30f, 15f)
}
            

Or enable it manually:

                private fun setDpmMode() {
    bkdView.config = BarkoderConfig(this, "LICENSE_KEY") {
        Log.i("Licensing SDK: ", it.message)
    }

    BarkoderHelper.applyConfigSettingsFromTemplate(this, bkdView.config, BarkoderConfigTemplate.DPM,
        object : BarkoderConfigCallback { // This is sync callback
            override fun onSuccess() {
                bkdView.config.isRegionOfInterestVisible = true
                bkdView.config.setRegionOfInterest(40f, 40f, 15f, 15f)
            }

            override fun onFail(p0: BarkoderException?) {
                TODO("Not yet implemented")
            }
        })
}
            

Page Contents

History:

close