/**
         * called each time ScanAPI receives decoded data from scanner
         * @param deviceInfo contains the device information from which
         * the data has been decoded
         * @param decodedData contains the decoded data information
         */
        public void OnDecodedData(DeviceInfo device, ISktScanDecodedData decodedData)
        {
            // The following throws an exception - not sure why - something is null
            //RunOnUiThread (() => decodedDataField.Text = new string(decodedData.GetData ()));
            //
            // This seems to take care of the exception:
            string s = new string(decodedData.GetData());

            RunOnUiThread(() => decodedDataField.Text = s);              // Use RunOnUiThread for Android instead of InvokeOnMainThread()
        }
        // some decoded data have been received
        public void OnDecodedData(ScanApiHelper.DeviceInfo device, ISktScanDecodedData decodedData)
        {
            UpdateDecodedDataText(decodedData.DataToUTF8String);
// This is for the Host Acknowledgment feature. These lines can
// be safely removed from #if to the #endif from your application
// if this feature is not needed
#if HOSTACK
            Thread.Sleep(3 * 1000); // just a delay to show the trigger lock...
            // Send confirmation to scanner, good or bad
            _scanApiHelper.PostSetDataConfirmation(_device, bDoGoodScan, null);
            bDoGoodScan = !bDoGoodScan; // Alternate between a good read and a bad read..
#endif
        }
 // some decoded data have been received
 public void OnDecodedData(ScanApiHelper.DeviceInfo device, ISktScanDecodedData decodedData)
 {
     UpdateDecodedDataText(decodedData.DataToUTF8String);
 }
        private bool bDoGoodScan = true; // used to alternate between a 'good' ack and a 'bad' ack for demo

        #endif

        #region Methods

        // some decoded data have been received
        public void OnDecodedData(ScanApiHelper.DeviceInfo device, ISktScanDecodedData decodedData)
        {
            UpdateDecodedDataText(decodedData.DataToUTF8String);
            // This is for the Host Acknowledgment feature. These lines can
            // be safely removed from #if to the #endif from your application
            // if this feature is not needed
            #if HOSTACK
            Thread.Sleep(3 * 1000); // just a delay to show the trigger lock...
            // Send confirmation to scanner, good or bad
            _scanApiHelper.PostSetDataConfirmation(_device, bDoGoodScan, null);
            bDoGoodScan = !bDoGoodScan; // Alternate between a good read and a bad read..
            #endif
        }
 public void OnDecodedData(DeviceInfo device, ISktScanDecodedData decodedData)
 {
     this.decodedData.Text = Marshal.PtrToStringAuto(decodedData.Data);
 }
 // some decoded data have been received
 public void OnDecodedData(ScanApiHelper.DeviceInfo device, ISktScanDecodedData decodedData)
 {
 }