6 Replies Latest reply on Nov 16, 2016 11:57 PM by 9ee6e931-c37a-4cfb-b1d3-c8c319072c6e

    Error instantiating the scanner EMDK 4.2

    none none



      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


         // 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




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


      Any idea about what can be happening here?


      Thanks and regards.