Only for Android. Based on this example: https://github.com/darryncampbell/DataWedge-Intent-Example-1
This package was created to support hardware scanner for Zebra devices (ET5X) with older DataWedge Version (^5.0). Providing a simple stream which contains events fired by DataWedge (5.0).
For sure this is a minimal solution as it focus only to support DataWedge version 5.0. With newer DataWedge versions there are more possibilities and also prettier solutions. Like creating incode the necessary profile.
This package is marked as discontinued since it is a simple intent wrapper with data wedge preconfiguration. Also we don't have anymore devices to test.
Please consider switch to an intent
package directly or fork this package.
As described in the previous written link, you have to set up your profile configuration properly to be able listen for the DataWedge Intent.
- go to the DataWedge application and create a new
profile
for our application or modify theProfile0
. - Enable the profile
- Enable
Barcode input
- Enable
Intent output
- Configure the
Intent output
as follows:Intent action
=io.mway.flutter_zebra_datawedge.ACTION
- leave
Intent category
empty Intent delivery
=Broadcast
String _data = "waiting...";
String _labelType = "waiting...";
String _source = "waiting...";
// create a listener for data wedge package
Future<void> initDataWedgeListener() async {
DataWedgeIntent.listenForDataWedgeEvent((response) {
if (response != null && response is String)
setState(() {
Map<String, dynamic> jsonResponse;
try {
jsonResponse = json.decode(response);
} catch (e) {
//TODO handling
}
if (jsonResponse != null) {
_data = jsonResponse["decodedData"];
_labelType = jsonResponse["decodedLabelType"];
_source = jsonResponse["decodedSource"];
} else {
_source = "An error occured";
}
});
});
}
This package is only tested on Zebra ET5X with Android version 5.1.1 and DataWedge version 5.0.17.