honeywell_mobility_sdk 1.0.0 copy "honeywell_mobility_sdk: ^1.0.0" to clipboard
honeywell_mobility_sdk: ^1.0.0 copied to clipboard

PlatformAndroid
outdated

The Mobility SDK includes tools and resources that leverage functionality unique to our Honeywell Android mobile computers.

Honeywell Mobility SDK for Flutter #

The Mobility SDK includes tools and resources that leverage functionality unique to our Honeywell Android mobile computers.

Setup #

Add the following line to android/app/build.gradle:

dependencies {
    ...
    implementation 'com.github.AcmeSoftwareLLC:hwmsdk-android:main-SNAPSHOT' // add this line
}

Usage #

final barcodeReader = await HoneywellMobilitySdk.createBarcodeReader(
  onRead: (event) {
    print(event.barcodeData);
  },
  onFailure: (event) {
    print(event.timestamp);
  },
  onTrigger: (event) {
    print(event.state);
  },
);

barcodeReader.claim(); // Once claiming the barcode reader, the callbacks will be active.

Note: The barcode reader will be null if the device does not support the barcode scanning.

Scanning with software trigger #

// true behaves as if the trigger was pressed, false behaves as if the trigger was released
barcodeReader.softwareTrigger(true|false);

Handling lifecycle changes #

@override
void didChangeAppLifecycleState(AppLifecycleState state) {
  switch (state) {
    case AppLifecycleState.resumed:
      barcodeReader.claim();
      break;
    case AppLifecycleState.inactive:
    case AppLifecycleState.paused:
      barcodeReader.release();
      break;
    case AppLifecycleState.detached:
      barcodeReader.close();
      break;
  }
}

See the example app for more details.

3
likes
140
points
49
downloads

Publisher

verified publisheracmesoftware.com

Weekly Downloads

The Mobility SDK includes tools and resources that leverage functionality unique to our Honeywell Android mobile computers.

Homepage
Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, pigeon, plugin_platform_interface

More

Packages that depend on honeywell_mobility_sdk