Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] Using an external barcode scanner with a Delphi 10.3 Rio Firemonkey Android app

Posted on November 14, 2022

Solution 1 :

most of barcode reader in android has an SDK driver and send data via a Broadcast intent.
you should check in settings form if there’s some info about it or inside the SDK. You just need the activity and category name and some extra info inside intent.

Problem :

There are a few questions about using a barcode scanner with Delphi in SO, and if this was a VCL Windows application there would be no drama, but none of the answers seem to work for me. This is also about using an external scanner and not using the devices camera to scan barcodes, as that is also a doddle.

In a VCL app where I couldn’t ensure which control has the focus, I would capture all the keys in KeyPreview, and on getting a CR, take the preceding value and check to see if it matches a product barcode.

Unfortunately, Firemonkey forms have no KeyPreview and I can’t use the KeyDown event of the FMX form, as it has several controls capable of receiving text input, and if any of them have the focus, the event doesn’t fire for the form.

These problems are all based on the scanner being paired as a HID, but as an option on the Motorola CS3070 Bluetooth scanner I am using, there is also a Serial Port Profile mode. It still pairs with the tablet, but not as a keyboard.

But there doesn’t seem to be anything in the Android UI to indicate what “serial ports” the tablet has, and even if it did, I don’t really have any idea on how to connect to and “listen” to that port inside a Delphi Firemonkey app.

READ  [ANSWERED] Android Paging 3 jetpack compose how to scroll to top or reset the paging when navigating back
Powered by Inline Related Posts

As others have indicated, serial ports in Android are a different beast to Windows, and it looks like Delphi 10.3 Rio has no native support for using them.

What other options are there?

EDIT:

Looking at the Zebra website, which sell a re-branded CS3070, there is an Android SDK for their scanners, although sadly not for the CS3070 but they do have one for the CS4070. In the documentation they talk about connecting using BlueTooth or SNAPI (which I believe is the USB/serial mode), and also about subscribing to the scanner events.

Is this something we can do from FireMonkey without an SDK?

Comments

Comment posted by Delphi Coder

Does

Comment posted by SiBrit

@DelphiCoder. I will take a look tomorrow and see if it can work, although it seems that supporting a HID scanner is the requirement going forward.

Comment posted by drcrck

just for example , in my case, Zebra generates a broadcast with something similar to action = “com.symbol.datawedge.decode” and extra “com.symbol.datawedge.data_string” ; datalogic : com.datalogic.decodewedge.decode_action , speedata : “com.se4500.onDecodeComplete” Etc

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress