It is important to recognize that there are several fundamental differences in the capabilities of smartphones (and tablets) as barcode scanning devices. These differences result in a user experience different from purpose-built scanners, impacting the design of the mobile barcode scanning application.
These differences and the general impact they have on your application are the following:
The cmbSDK has been specifically engineered to make these differences as transparent as possible to the application developer and the user. By following a few simple guidelines, it is possible to develop applications that work and behave the same, whether using an MX-1000 mobile terminal, or just the built-in camera of the device.
Without a hardware trigger, mobile devices must use alternative methods to initiate barcode scanning. There are three common paradigms used:
The cmbSDK supports all three of these methods, any one of which (or multiple) can be used in an application.
As previously discussed, unlike like purpose-built scanners, mobile devices do not have a built-in aimer. Barcode aimingis generally accomplished by providing a live-stream preview from the camera on the mobile device display: the user can then reposition the device until the barcode presents in the field of view and is decoded.This task is greatly simplified with the cmbSDK as it provides a built-in preview control that can be displayed full-screen,partial screen, and in either portrait or landscape orientation.The cmbSDK also supports "passive" aimers: devices that attach to the mobile device or mobile device case that use theLED flash of the device as a light source to project an aiming/targeting pattern. The advantage to these types of aimers isthat an on-screen preview is no longer required (since the mobile device can now project an aimer pattern similar to apurpose-built scanner). One limitation of passive aimers, though, is that since the mobile device flash is being used forthe aimer, using the LED flash for general scanning illumination is not available.
Mobile devices support developing applications for either portrait orientation, landscape orientation, or auto-rotation between the two. The cmbSDK fully supports all three options for both the presentation of the barcode preview as well as the scan direction. As mentioned previously, most barcodes can be scanned by a mobile device regardless of the orientation of the application and/or mobile device.
In some circumstances, though, using landscape orientation may be advantageous or even necessary. Mobile cameras have a higher resolution along the "height" of the image in portrait mode. For example, a common resolution used is 1280x720. When scanning barcodes in portrait mode, this means that 720 pixels of data are available for barcode decoding along the horizontal axis. If scanning a particularly long or dense barcode (e.g. a large PDF417), using the landscape orientation provides 1280 pixels on the horizontal scan line. Orientation makes little to no difference when scanning "square" barcodes like QR, Data Matrix, and MaxiCode.
Today's smartphones and tablets have significant computing power. With multi-core CPUs and even dedicated image processors, they provide an ideal platform for cost-effective and efficient barcode decoding. As powerful as these devices are, developers are still advised to consider optimizing their barcode scanning applications. While the SDK has been optimized specifically for mobile environments, image analysis and barcode decoding is still a CPU intensive activity: and since these processes must share the mobile device CPU with the operating system, services, and other applications, developers should limit their applications to only using the features of the SDK that satisfy their needs.
Application optimizations include the following:
For these reasons, when the cmbSDK is initialized for use with the built-in camera of the mobile device, no barcode symbologies are enabled by default: the application must explicitly enable the symbologies it needs. As most barcode scanning applications only truly need to scan a handful of symbologies, this behavior steers the developer to using the SDK in an efficient manner.
Enabling symbologies is a very simple process, which is explained later in this document.