- Knowledge Base
- Developer
- HMT Development Examples
-
Developer
-
RealWear Navigator™ 500 Series
- Overview
- Features and Specifications
- Wearing Your Device
- Device Setup
- Interacting with Your Device
- Device Power
- Battery Use
- Home Screen
- My Programs
- My Camera
- My Files
- My Training
- Safety
- Device Care
- Ownership Information
- User Guide
- FAQ
- Thermal Camera Module
- Display Technology Comparison
- Cleaning Your Device
-
RealWear Cloud
-
RealWear Releases
-
RealWear HMT-1®
-
RealWear HMT-1Z1®
-
RealWear Apps
-
Configure
-
RealWear Modules & Accessories
-
RealWear Navigator™ Series
Development Example – Barcode Applet
The HMT barcode application can be used by third party applications.
These applications can launch the barcode application which will ask the user to scan a barcode. The data from the captured barcode will be returned to the calling application.
Launch Barcode Scanner
private static final int RequestCode = 1984;
private static final String ACTION_BARCODE =
"com.realwear.barcodereader.intent.action.SCAN_BARCODE";
private static final String EXTRA_RESULT =
"com.realwear.barcodereader.intent.extra.RESULT";
...
Intent intent = new Intent(ACTION_BARCODE);
startActivityForResult(intent, RequestCode);
Listen for barcode scan result
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == Activity.RESULT_OK && requestCode == RequestCode) {
String result = "[No Barcode]";
if (data != null) {
result = data.getStringExtra(EXTRA_RESULT);
}
mBarcodeResultsView.setText(result);
}
}