Error instantiating the scanner EMDK 4.2

n none none 3 years 6 months ago
4 2 0

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.

Please Register or Login to post a reply

2 Replies

Y Yanis Dalabiras

Hello,
In order to get a better understanding of what might be happening, could you provide the Device model ( I assume tc75 from the hotfix name above), device build number ( Settings > About phone > Build number ) and the contents of your build.gradle ( Module: app ) for the emdk project?

Adding the EMDK as a dependency in the gradle file is defiantly the way to go.

R Richard Venderbosch

We made a similar experience after installing a patch on TC75:

Our solution is to not install these patches anymore ...

CONTACT
Can’t find what you’re looking for?