Zembra Xamarin EMDK ScannerException

Hi.

I am tring this code: http://techdocs.zebra.com/emdk-for-xamarin/3-0/tutorial/barcodeapitutorial/

Basic Scanning Tutorial using Barcode API - Zebra Technologies Techdocs

It seems to work but I have an exception here:

   try
  
{

  
//Get the feature object such as BarcodeManager object for accessing the feature.
  barcodeManager
= (BarcodeManager)emdkManager.GetInstance(EMDKManager.FEATURE_TYPE.Barcode);

  scanner
= barcodeManager.GetDevice(BarcodeManager.DeviceIdentifier.Default);

  
if (scanner != null)
  
{

  
//Attahch the Data Event handler to get the data callbacks.
  scanner
.Data += scanner_Data;

  
//Attach Scanner Status Event to get the status callbacks.
  scanner
.Status += scanner_Status;

  scanner
.Enable();

  
//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;
  scanner
.SetConfig(config);

  
}
  
else
  
{
  displayStatus
("Failed to enable scanner.\n");
  
}
  
}
  
catch (ScannerException e)
  
{
  displayStatus
("Error: " + e.Message);
  
}

When the execution reach scanner.SetConfig, I receive an exception:

Already scanning. Wait for current scanning to complete

I don't understand which could be the problem, but in this way the configuration is not accepted.

Thanks

Alessandro

Anonymous (not verified)
Hi, can you please try with

Hi, can you please try with the barcode sample: samples-emdkforxamarin-3_0/BarcodeSample1 at master · Zebra/samples-emdkforxamarin-3_0 · GitHub .  To get that sample to compile you will also need to include the EMDK component from Nuget.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Alessandro Caliaro
Hi ​.I know the sample but it

Hi ​.

I know the sample but it use the User Interface to set paramaters.

I would like to start reading using "hard" trigger without select nothing from the UI. I have tried to cut and paste the code in the sample but the scanner not start when I press the trigger

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Alessandro Caliaro
Which could be the reason

Which could be the reason that the "red light" does not turn on?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Alessandro Caliaro
Ok Darryn, problem solved. I

Ok Darryn, problem solved. I have set ContinuosReading flag to true, now it works without exception.

Thanks

Inviato da Posta per Windows 10

Da: Darryn Campbell

Inviato: venerdì 15 febbraio 2019 16:51

A: Alessandro Caliaro

Oggetto: Re: - Zembra Xamarin EMDK ScannerException Zebra Technologies Developer Portal

Zembra Xamarin EMDK ScannerException

risposta da Darryn Campbell su Our Community - Visualizza la discussione completa

Hi, can you please try with the barcode sample: samples-emdkforxamarin-3_0/BarcodeSample1 at master · Zebra/samples-emdkforxamarin-3_0 · GitHub .  To get that sample to compile you will also need to include the EMDK component from Nuget.

Rispondi a questo messaggio rispondendo a questa e-mail o vai al messaggio su Zebra Technologies Developer Portal Inizia una nuova discussione in Our Community per e-mail o su Zebra Technologies Developer Portal Stai seguendohttps://developer.zebra.com/message/100330?et=watches.email.thread#100330 Zembra Xamarin EMDK ScannerException in questi flussi: Posta in arrivo Questa e-mail ti è stata inviata da Zebra Technologies Developer Portal in quanto utente registrato. Puoi annullare l'iscrizione da Zebra Technologies Developer Portal con effetto immediato, oppure modificare le impostazioni per la ricezione delle e-mail qui

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Nicolas SALVIN
Same problem

Hi !

Same problem here. Do you found a solution without enabling continuous reading ?

thanks

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Simone Giglio
Same Problem

Hi!
I have the same problem too. I also used the same example. For business needs I can't use continuous reading. Any possible solution?

thanks to all

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments