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