ET1 and MSR Module

// Expert user has replied.
Y Yanis Dalabiras 3 years 6 months ago
2 3 0

Hi. Does anybody know how the applications can receive data from the MSR module for the ET1? Can DataWedge do this or threre is available APIs or libraries for the developers? Thank you

Please Register or Login to post a reply

3 Replies

Y Yanis Dalabiras

I asked Rick Rogers the same question.  Here was his response: You can configure DataWedge (through a profile) so it will send an Android intent when it reads a bar code (or a magstripe, though to be perfectly honest I’ve only tried the barcode).  So you don’t have to have an EditText open to accept the characters, your app can just pick up the intent and get the info.
It’s described in the ET-1 Integrator Guide.

 Here’s a sample app I made up for NA AppForum – it’s  a toy app, but shows the way to receive the intent.  You have to add the intent into your manifest, and add a method overriding onNewIntent() in the Activity where you want to catch the intent (in this  case,  ScanActivity).  The video of the accompanying talk is here, which goes a bit into the Datawedge profile configuration, but that part is straightforward.

R Richard Baker

DataWedge demo will allow you to display the magstripe information. In an application I believe Rho has the program call for MSR. In a native app they would need to use DataWedge.

Y Yanis Dalabiras

I'm also looking for the same information.  Is there any documentation or sample code illustrating how to access the Wedge from an Android Native Application?  In general, you just need to set up a broadcast reciever as follows:
 

// Setup Receiver to receive Barcode Data.

 

 

 

mCaptureBarcode = new BroadcastReceiver() {     @Override      public void onReceive(Context arg0, Intent intent)      {         if (dbgLog != null)         {             dbgLog.LogMsg(TAG, "CaptureBarcode:"+ intent.getStringExtra("com.motorolasolutions.emdk.datawedge.data_string"), Log.DEBUG);

 

 

 

            if (dbgLog != null)             {                 Bundle bundle = intent.getExtras();

 

 

                for (String key:bundle.keySet())                 {                     try                      {                         dbgLog.LogMsg(TAG, key.toString() + "," + bundle.getString(key), Log.DEBUG);                     }                      catch (Exception e)                      {                         e.printStackTrace();                     }                 }             }         }

 

 

 

        if (mSessionService != null)         {             mSessionService.SendBarcodeData(intent.getStringExtra("com.motorolasolutions.emdk.datawedge.data_string"));         }     }; };

 

 

this.registerReceiver(mCaptureBarcode, new IntentFilter("CaptureBarcode"));

 

 

If got the receiver dumping out all of the data that you get from the wedge.  There's also an advanced version of the Wedge (don't know if it's released or not) that will allow you to enable/disable the Wedge from your application.

CONTACT
Can’t find what you’re looking for?