Error instantiating the scanner EMDK 4.2

Hello.

 

Following this example ( Basic Scanning Tutorial using Barcode API - Zebra Technologies Techdocs ) we made a class to handle the scanner. It was working fine but we updated the device. We used the patches:

- CFE-TC75XX-K-XX-001404-X-00-03

- T75N0KFXXRFxx01404

We also installed ZebraMXService_1.9.2.22_GA to link with MDM Airwatch.

 

After this, we started experiencing issues with the scanner. The code bellow throws a NullPointerException when we request the scanner:

private void initializeScanner() throws ScannerException {

   if (scanner == null) {

   // Get the Barcode Manager object
   barcodeManager = (BarcodeManager) emdkManager.getInstance(EMDKManager.FEATURE_TYPE.BARCODE);

   // Get default scanner defined on the device
   scanner = barcodeManager.getDevice(BarcodeManager.DeviceIdentifier.DEFAULT);

   // Add data and status listeners
   scanner.addDataListener(this);

   scanner.addStatusListener(this);

   // Hard trigger. When this mode is set, the user has to manually
  // press the trigger on the device after issuing the read call.
   scanner.triggerType = Scanner.TriggerType.HARD;

   // Enable the scanner
   scanner.enable();

  }

}

 

We tried to add the EMDK as library instead of compile sdk version.

 

Any idea about what can be happening here?

 

Thanks and regards.