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 makes these differences as transparent as possible to the application developer and the user. By following a few simple guidelines, you can develop applications that work and behave the same when using for example 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 methods used:
The cmbSDK supports all three methods, any of which (or multiple) can be used in an application.
Unlike purpose-built scanners, mobile devices do not have a built-in aimer. Barcode aiming is 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 appears in the field of view and is decoded.
The cmbSDK simplifies this task by providing a built-in preview control that can be displayed fullscreen, partial screen, and in either portrait or landscape orientation.
The cmbSDK also supports "passive" aimers: devices that attach to the mobile device or its case that use the LED flash of the device as a light source to project an aiming or targeting pattern. The advantage of these aimers is that an on-screen preview is no longer required, as the mobile device can project an aimer pattern similar to a purpose-built scanner. However, note that using the LED flash for general scanning illumination is not available because the mobile device flash is used for the aimer.
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. Most barcodes can be scanned by a mobile device regardless of the orientation of the application and/or the mobile device.
For scanning "square" barcodes like QR, Data Matrix, and MaxiCode, any orientation can be used. However, for scanning long or dense barcodes like a large PDF417, using landscape orientation is recommended or even necessary. Mobile cameras have a higher resolution along the "height" of the image in portrait mode. For example, 1280x720 is a commonly used resolution. This means that scanning barcodes using portrait orientation provides 720 pixels of data along the horizontal axis, while landscape orientation provides 1280 pixels on the horizontal scan line for barcode decoding.
With multi-core CPUs and dedicated image processors, today's handheld devices have significant computing power and provide an ideal platform for efficient and cost-effective barcode decoding. It is still recommended for developers to optimize their barcode scanning applications. The cmbSDK is optimized specifically for mobile environments, but image analysis and barcode decoding is still a CPU intensive activity. Since these processes share the mobile device's CPU with the operating system, services, and other applications, developers are advised to limit their applications to only using the features of the SDK that they need.
Application optimizations include the following:
For these reasons, when the cmbSDK is initialized for use with the the mobile device's built-in camera, no barcode symbologies are enabled by default, and the application must only enable the symbologies it needs. As most barcode scanning applications only need to scan a handful of symbologies, this behavior encourages the developer to use the SDK in an efficient manner.