2 Replies Latest reply on Sep 28, 2018 4:50 AM by Altamir Benkenstein

    How to integrate Bluetooth Scanner into Xamarin App on Non-Zebra Device

    Uwe Reisewitz

      Hi,

      I've installed the Zebra Scanner Control App on a Nexus 9 Tablet (Android 7.1, API 25) and was able to connect to a DS3678 scanner.

      Now I would like to be able to scan from my Xamarin (Forms) App. EMDK for Xamarin does not work because it expects some infrastructure that is not present on Non-Zebra devices.

      I've create a Xamarin Android Bindings Libray (Xamarin) in VS2017 around the "barcode_scanner_library_v2.2.4.0.aar" and was able to compile and build it successfully.

      If I try to instantiate the central Class SDKHandler I get an exception "ClassNotFound".

       

      I'm stuck here. Is there anybody that tried something similar and succeeded? Are there any working samples available?

       

      Thanks in advance for any help

       

      Best regards

       

      Uwe

        • Re: How to integrate Bluetooth Scanner into Xamarin App on Non-Zebra Device
          Uwe Reisewitz

          I'm one step further. I did set an explicit Target Framework and now the instantiation of SDKHandler works.

          Now I tried to get the SdkVersion: _sdkhandler.DcssdkGetVersion();returns an empty string.

          The I tried to get a list of available and/or connected scanners (there was a DS3678 connected at the time). The list is empty so I'm obviously missing something here.

          Here's my code:

                          _sdkhandler = new SDKHandler(Context);

                          List<DCSScannerInfo> scannerinfos = new List<DCSScannerInfo>();

           

                          scannerinfos.Clear();

                          string version = _sdkhandler.DcssdkGetVersion();  <== returns an empty string

                          _sdkhandler.DcssdkGetAvailableScannersList(scannerinfos); <== returns an empty list

                          _sdkhandler.DcssdkGetActiveScannersList(scannerinfos);  <== returns an empty list

           

          Any help would be grately appreciated

           

          Best regards

          Uwe