Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for Android

Enable Portrait mode on landscape-only Android devices

Some Android 2.3+ devices with incomplete camera drivers only support a landscape camera feed. To allow barcode scanning in portrait mode on these devices, the Scandit BarcodeScanner offers a non-customizable, full screen fallback that emulates a portrait scan user interface. To determine whether a certain device only supports landscape camera feeds, the Scandit BarcodePicker offers a static method BarcodePicker.canRunPortraitPicker().

The following snippet shows you can support these old devices and scan in portrait mode:

boolean emulatePortraitMode = !BarcodePicker.canRunPortraitPicker();
if (emulatePortraitMode) {
// fix orientation to landscape