We're going to start adding sample code for these types of features into the Concierge SDK. That said, here is a quick snippet to explain what you're looking for...
Barcode scans are considered to be first-class events on Concierge in the same way that keyboard strokes or touch events are. As such, the foreground application is given the right of first refusal to the barcode scan via a callback in the Activity class. The code below illustrates this:
public class MainActivity extends Activity implements BarcodeScanEvent.Callback
... implement your Activity as usual here ...
public boolean onBarcodeScan(BarcodeScanEvent evt)
Toast.makeText(this, evt.getCharacters(), Toast.LENGTH_SHORT).show();
If the foreground Activity either does not implement the onBarcodeScan callback or returns false, then the event is fired as an Intent to the rest of the system for other Activities to handle. You can filter for this Intent using the following sample from an AndroidManifest.xml file:
<!-- Intent filter to view a upc -->
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/upc" />
I hope this answers your question!
Thanks Lorne, it works.