question

kolesvlad avatar image
kolesvlad asked vhernandez commented

Barcode receiver cannot receive PDF-417 type

We can’t receive PDF-417 barcodes (US driver license) in a barcode broadcast receiver. We’ve noticed that the receiver can receive only strings without whitespaces. For example, if we send «123456789123» (12-digit barcode) - it’s okay. But when it’s «123 456789» nothing happens.


In the PDF-417 barcode there are several whitespaces present (like in street address), so it can’t be received as well. The question is if there is a way to read a driver license barcode and receive it in a typical barcode receiver written with Clover SDK?


Our code is quite standard:


AndroidManifest.xml

<receiver
    android:name=".model.receivers.BarcodeReceiver"
    android:enabled="true"
    android:exported="true">

    <intent-filter android:priority="999">
        <action android:name="com.clover.BarcodeBroadcast" />
    </intent-filter>
</receiver>


Barcode Receiver:

class BarcodeReceiver : BroadcastReceiver() {

    override fun onReceive(context: Context?, intent: Intent?) {
        val barcodeResult = BarcodeResult(intent)
        val barcode = barcodeResult.barcode
        onBarcodeReceived(barcode)
    }
}
barcode scanner
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

vhernandez avatar image vhernandez commented ·

Try registering the broadcast programmatically

0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community