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) } }