Exception setting config on scanner using EMDK for Xamarin

Hello all, as the title suggests, I have been having an issue with setting the config for the scanner. It generates an exception (at bottom of this thread) EVERY SINGLE TIME:

 

Therefore, I have to also believe that the config I am trying to specify is not actually getting applied.

 

As a last resort, before I posted this issue, I downloaded the sample barcode app (BarcodeScanningTutorial) and made NO changes to the code and sure enough, the same thing is happening to the sample provided on the site. Here is the code snippet that is failing, this is inside of initScanner(); As you can see, the only change I did make, which does not affect the code, is I wrapped the problem child which is the call scanner.SetConfig(config); in a try catch block so I can trap that call and exception by itself.

 

                            //EMDK: Configure the scanner settings

                            ScannerConfig config = scanner.GetConfig();

                            config.SkipOnUnsupported = ScannerConfig.SkipOnUnSupported.None;

                            config.ScanParams.DecodeLEDFeedback = true;

                            config.ReaderParams.ReaderSpecific.ImagerSpecific.PickList = ScannerConfig.PickList.Enabled;

                            config.DecoderParams.Code39.Enabled = true;

                            config.DecoderParams.Code128.Enabled = false;

                            try

                            {

                                scanner.SetConfig(config);

                            }

                            catch (Exception ex)

                            {

                                Console.WriteLine(string.Format("Exception setting config. Exception: {0}", ex.ToString()));

                            }

 

Here is the error (Stack Trace) that I got from the console output from that try catch exception:

 

09-21 16:10:23.110 I/mono-stdout(15081): com.symbol.emdk.barcode.ScannerException: Already scanning. Wait for current scanning to complete.

09-21 16:10:23.120 I/mono-stdout(15081): at com.symbol.emdk.barcode.Scanner.setConfig(Scanner.java:303)

com.symbol.emdk.barcode.ScannerException: Already scanning. Wait for current scanning to complete.

  at com.symbol.emdk.barcode.Scanner.setConfig(Scanner.java:303)

  at md5bb34e478d867dfa25d7f85c991bd27cf.MainActivity.n_onOpened(Native Method)

  at md5bb34e478d867dfa25d7f85c991bd27cf.MainActivity.onOpened(MainActivity.java:75)

09-21 16:10:23.120 I/mono-stdout(15081): at md5bb34e478d867dfa25d7f85c991bd27cf.MainActivity.n_onOpened(Native Method)

09-21 16:10:23.120 I/mono-stdout(15081): at md5bb34e478d867dfa25d7f85c991bd27cf.MainActivity.onOpened(MainActivity.java:75)

09-21 16:10:23.120 I/mono-stdout(15081): at com.symbol.emdk.EMDKServiceConnection.notifyonConnected(EMDKServiceConnection.java:113)

09-21 16:10:23.120 I/mono-stdout(15081): at com.symbol.emdk.EMDKServiceConnection.onServiceConnected(EMDKServiceConnection.java:93)

  at com.symbol.emdk.EMDKServiceConnection.notifyonConnected(EMDKServiceConnection.java:113)

  at com.symbol.emdk.EMDKServiceConnection.onServiceConnected(EMDKServiceConnection.java:93)

  at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1101)

  at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1118)

  at android.os.Handler.handleCallback(Handler.java:733)

  at android.os.Handler.dispatchMessage(Handler.java:95)

  at android.os.Looper.loop(Looper.java:136)

  at android.app.ActivityThread.main(ActivityThread.java:5002)

09-21 16:10:23.120 I/mono-stdout(15081): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1101)

09-21 16:10:23.120 I/mono-stdout(15081): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1118)

09-21 16:10:23.120 I/mono-stdout(15081): at android.os.Handler.handleCallback(Handler.java:733)

09-21 16:10:23.120 I/mono-stdout(15081): at android.os.Handler.dispatchMessage(Handler.java:95)

09-21 16:10:23.120 I/mono-stdout(15081): at android.os.Looper.loop(Looper.java:136)

09-21 16:10:23.120 I/mono-stdout(15081): at android.app.ActivityThread.main(ActivityThread.java:5002)

  at java.lang.reflect.Method.invokeNative(Native Method)

  at java.lang.reflect.Method.invoke(Method.java:515)

  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)

  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)

  at dalvik.system.NativeStart.main(Native Method)

09-21 16:10:23.120 I/mono-stdout(15081): at java.lang.reflect.Method.invokeNative(Native Method)

09-21 16:10:23.120 I/mono-stdout(15081): at java.lang.reflect.Method.invoke(Method.java:515)

09-21 16:10:23.120 I/mono-stdout(15081): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)

09-21 16:10:23.120 I/mono-stdout(15081): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)

09-21 16:10:23.120 I/mono-stdout(15081): at dalvik.system.NativeStart.main(Native Method)

 

Please advise how to fix this. I am certain that it is happening to everybody since I used the sample program provided by Zebra which also is written per the documentation as well.

 

Thanks!

 

Mike