cancel
Showing results for 
Search instead for 
Did you mean: 

Scan OpenUI:Windows Device

NidhiDeep
Explorer
0 Kudos

Hi All,

I am very new to OpenUI sdk.

We are using Panasonic G1 tablet for our SAP Work Manager Implementation. We are currently using Agentry client 70.9.06 and currently building the Barcode/RIFD Scanning using Scan template provided by the OpenUI sdk. In the Class TheScanner.cs  we implemented the barcode scanning logic using Panasonic G1 sdk. So we have a method:

  public  void OnBarcodeScanned(object sender, ScanDataEventArgs sData)

        {

            myArray = new object[2];

            myArray[0] = sData.TextData;

            myArray[1] = sData.BinaryData;

which will be called on the click of button action defaultbutton_click , defined in the WindowDebugAlternativeInput.xaml.

We have not tested the functionality ,but according to logic the binary data will be in the myArray[1]. But how would I pass this data to Agentry client UI and how the action of the Agentry client UI button will call the OnBarcodeScanned method in TheScanner.cs.

Also, will this barcode scanning also support RFID scanning , our G1 tablet has a RFID reader.

Regards

Deep

Accepted Solutions (0)

Answers (1)

Answers (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Deep,

The Scanner Template project that comes with the OpenUI Framework is simply a sample template to give a working example.  The sample project does two things,

  1. It sets up a timer event to automatically generate a scan event every 10 seconds.  This is simulating a condition where a hardware button was pressed to scan a barcode/rfid tag.
  2. When the soft scan button in the Agentry app is pressed it displays a dialog box (WindowsDebugAlternateInput) to let the user type in a value which is then sent back to Agentry as a Scan event.

If you are trying to link in an actual scanner you should start with the TheScanner.cs class as a framework and then make sure the following is in place.

  1. In the constructor for the class initialize your scanner api/hardware
  2. Setup whatever listener you need for receiving scan data from the api (your OnBarcodeScanned?).
  3. Setup the Initiate Scan method to turn on the scanner in response to the soft scan button being clicked in Agentry
  4. Look at / use the RaiseAlternateInputReceived method to pass the data back to Agentry as a scan event.

I don't think you want to tie this to the defaultbutton_click from the WindowsDebugAlternateInput as that means you need to first display that dialog and then have the user click the button to start the scan.  If that is your intent the InitiateScan method is the place to put that.

Good Luck!

--Bill

NidhiDeep
Explorer
0 Kudos

Hi Bill,

I have followed following steps:

  1. In the constructor for the class initialize your scanner api/hardware

          NumberReached += new DelBarcodeScanned(OnBarcodeScanned);

2. Listener has been implemented (onBarcodeScanned).

3. Setup the Initiate Scan method to turn on the scanner in response to the soft scan button being clicked in Agentry - I am not sure how this will be done.


4.Look at  use the RaiseAlternateInputReceived method to pass the data back to Agentry as a scan event - I have passed myArray[1] (binary data ) after scan


RaiseAlternateInputReceived(Convert.ToString(myArray[1]));


5. On Agentry , I have created a button  having class TheScanner and external field string strPropertyName

6.The external field name is the same argument passed in the :


RaiseAlternateInput(string strPropertyName); method.

I am not getting any data in the strPropertyName , I even tried to hardcode the data :

RaiseAlternateInputReceived("Hello") , but the same result.

Please let me know where excatly , I am going wrong and how can I achieve step

3.

Regards

Deep