├── enioka_scan ├── .gitignore ├── multidex.pro ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── enioka │ │ │ └── scanner │ │ │ ├── api │ │ │ ├── ScannerLedColor.java │ │ │ ├── callbacks │ │ │ │ ├── package-info.java │ │ │ │ ├── ProviderDiscoveredCallback.java │ │ │ │ ├── ScannerDataCallback.java │ │ │ │ ├── ScannerInitCallback.java │ │ │ │ ├── ScannerCommandCallback.java │ │ │ │ └── ScannerConnectionHandler.java │ │ │ └── proxies │ │ │ │ ├── package-info.java │ │ │ │ ├── ProviderDiscoveredCallbackProxy.java │ │ │ │ ├── ScannerDataCallbackProxy.java │ │ │ │ ├── ScannerStatusCallbackProxy.java │ │ │ │ ├── ScannerCommandCallbackProxy.java │ │ │ │ ├── ScannerInitCallbackProxy.java │ │ │ │ └── ScannerConnectionHandlerProxy.java │ │ │ ├── bt │ │ │ ├── api │ │ │ │ ├── package-info.java │ │ │ │ ├── MessageRejectionReason.java │ │ │ │ ├── ScannerDataParser.java │ │ │ │ ├── Helpers.java │ │ │ │ ├── BtSppScannerProviderServiceBinder.java │ │ │ │ ├── DataSubscriptionCallback.java │ │ │ │ ├── BtSppScannerProvider.java │ │ │ │ ├── Command.java │ │ │ │ ├── ParsingResult.java │ │ │ │ └── BluetoothScanner.java │ │ │ ├── manager │ │ │ │ ├── package-info.java │ │ │ │ ├── bleserial │ │ │ │ │ ├── BleSubscriptionType.java │ │ │ │ │ ├── GattAttributeType.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── common │ │ │ │ │ ├── OnConnectedCallback.java │ │ │ │ │ ├── BluetoothScannerInternal.java │ │ │ │ │ ├── SerialBtScannerPassiveConnectionManager.java │ │ │ │ │ └── DataSubscription.java │ │ │ │ └── classicserial │ │ │ │ │ └── OnStreamConnectedCallback.java │ │ │ └── package-info.java │ │ │ ├── exc │ │ │ ├── ScannerException.java │ │ │ └── NoLaserScanner.java │ │ │ ├── activities │ │ │ ├── ManualInputItem.java │ │ │ ├── SnackbarResource.java │ │ │ └── ManualLogDialog.java │ │ │ ├── data │ │ │ └── Barcode.java │ │ │ ├── service │ │ │ └── ScannerClient.java │ │ │ └── helpers │ │ │ └── ScannerProviderHolder.java │ │ └── res │ │ ├── values │ │ ├── ids.xml │ │ ├── dimen.xml │ │ ├── styles.xml │ │ ├── colors.xml │ │ └── attrs.xml │ │ ├── drawable │ │ ├── pause_fill.xml │ │ ├── done.xml │ │ ├── flash.xml │ │ ├── upc.xml │ │ ├── info.xml │ │ ├── flashlight.xml │ │ ├── bell.xml │ │ ├── camera_fill.xml │ │ ├── flash_off.xml │ │ ├── lightbulb.xml │ │ ├── flashlight_off.xml │ │ ├── camera2.xml │ │ ├── open_link.xml │ │ ├── bell_slash.xml │ │ ├── lightbulb_off.xml │ │ ├── bug.xml │ │ └── upc_scan.xml │ │ └── layout │ │ └── dropdown_item.xml └── proguard-rules.pro ├── demoscannerapp ├── .gitignore ├── playstore │ ├── short_description.txt │ ├── icon.png │ ├── frature_graphic.png │ ├── phone_screenshots │ │ ├── home_activity.png │ │ ├── scan_activity.png │ │ ├── camera_activity.png │ │ ├── settings_activity_1.png │ │ └── settings_activity_2.png │ ├── attributions.txt │ └── full_description.txt ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_adaptive_back.png │ │ │ │ └── ic_launcher_adaptive_fore.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_adaptive_back.png │ │ │ │ └── ic_launcher_adaptive_fore.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_adaptive_back.png │ │ │ │ └── ic_launcher_adaptive_fore.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_adaptive_back.png │ │ │ │ └── ic_launcher_adaptive_fore.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_adaptive_back.png │ │ │ │ └── ic_launcher_adaptive_fore.png │ │ │ ├── values │ │ │ │ ├── styles.xml │ │ │ │ ├── colors.xml │ │ │ │ └── dimen.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ └── ic_launcher.xml │ │ │ ├── menu │ │ │ │ └── menu_main.xml │ │ │ └── drawable │ │ │ │ ├── search.xml │ │ │ │ ├── arrow_left.xml │ │ │ │ ├── cross.xml │ │ │ │ ├── crop.xml │ │ │ │ ├── upc.xml │ │ │ │ ├── black_bars.xml │ │ │ │ ├── stretch.xml │ │ │ │ ├── check_all.xml │ │ │ │ ├── github.xml │ │ │ │ ├── upc_scan.xml │ │ │ │ ├── gear_fill.xml │ │ │ │ └── baseline_settings_24.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── enioka │ │ │ │ └── scanner │ │ │ │ └── demo │ │ │ │ └── EspressoSemaphore.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── com │ │ └── enioka │ │ └── scanner │ │ └── demo │ │ └── ViewVisibleIdlingResource.java └── proguard-rules.pro ├── enioka_scan_m3 ├── .gitignore ├── libs │ └── .gitignore ├── proguard-rules.pro ├── src │ └── main │ │ └── AndroidManifest.xml └── build.gradle ├── enioka_scan_mock ├── .gitignore ├── src │ ├── test │ │ └── java │ │ │ └── android │ │ │ └── util │ │ │ └── Log.java │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── enioka │ │ └── scanner │ │ └── sdk │ │ └── mock │ │ └── MockProvider.java ├── proguard-rules.pro └── build.gradle ├── enioka_scan_honeywell ├── .gitignore ├── libs │ └── .gitignore ├── src │ └── main │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── enioka_scan_koamtac ├── .gitignore ├── libs │ └── .gitignore ├── proguard-rules.pro ├── src │ └── main │ │ └── AndroidManifest.xml └── build.gradle ├── enioka_scan_zebra ├── .gitignore ├── libs │ └── .gitignore ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── enioka │ │ │ └── scanner │ │ │ └── sdk │ │ │ └── zebra │ │ │ └── BtZebraConnectionCallback.java │ │ └── AndroidManifest.xml └── proguard-rules.pro ├── npm_integration_frameworks ├── reactnative │ ├── .nvmrc │ ├── tsconfig.build.json │ ├── android │ │ ├── src │ │ │ └── main │ │ │ │ ├── AndroidManifestNew.xml │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── activitystarter │ │ │ │ ├── ActivityStarterPackage.kt │ │ │ │ └── ActivityStarterModule.java │ │ └── gradle.properties │ ├── src │ │ └── index.tsx │ ├── .yarnrc.yml │ └── tsconfig.json └── cordova-capacitor │ ├── www │ └── main.js │ ├── package.json │ └── plugin.xml ├── Gemfile ├── docs ├── requirements.txt ├── pictures │ ├── crop.png │ ├── stretch.png │ └── black_bars.png ├── guides │ └── index.md ├── conf.py ├── api │ └── index.md └── index.md ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── fastlane ├── Appfile └── Fastfile ├── enioka_scan_camera └── src │ └── main │ ├── java │ └── com │ │ └── enioka │ │ └── scanner │ │ └── sdk │ │ └── camera │ │ ├── CameraApiLevel.java │ │ ├── CroppedPicture.java │ │ ├── CameraReader.java │ │ ├── FrameAnalysisContext.java │ │ ├── ZBarScanView.java │ │ └── ScannerCallback.java │ ├── res │ └── drawable │ │ └── text_background.xml │ └── AndroidManifest.xml ├── enioka_scan_honeywelloss_spp ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── enioka │ │ │ │ └── scanner │ │ │ │ └── sdk │ │ │ │ └── honeywelloss │ │ │ │ └── spp │ │ │ │ ├── data │ │ │ │ └── FirmwareVersion.java │ │ │ │ ├── commands │ │ │ │ ├── Cleanup.java │ │ │ │ ├── Beep.java │ │ │ │ ├── ActivateTrigger.java │ │ │ │ ├── DeactivateTrigger.java │ │ │ │ ├── DisableAimer.java │ │ │ │ ├── EnableAimer.java │ │ │ │ ├── EnableBarcodeMetadata.java │ │ │ │ ├── EnableIllumination.java │ │ │ │ ├── DisableIllumination.java │ │ │ │ ├── GetFirmware.java │ │ │ │ └── DisplayScreenColor.java │ │ │ │ └── parsers │ │ │ │ └── HoneywellOssDataTranslator.java │ │ └── AndroidManifest.xml │ └── test │ │ └── java │ │ └── android │ │ └── util │ │ └── Log.java └── build.gradle ├── .readthedocs.yaml ├── enioka_scan_zebraoss ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── enioka │ │ │ │ └── scanner │ │ │ │ └── sdk │ │ │ │ └── zebraoss │ │ │ │ ├── data │ │ │ │ ├── Ack.java │ │ │ │ ├── ScannerInit.java │ │ │ │ ├── RsmAttribute.java │ │ │ │ ├── Event.java │ │ │ │ ├── RsmAttributeReply.java │ │ │ │ └── ReplyRevision.java │ │ │ │ ├── commands │ │ │ │ ├── AimOn.java │ │ │ │ ├── ScanEnable.java │ │ │ │ ├── FlushQueue.java │ │ │ │ ├── ScanDisable.java │ │ │ │ ├── Beep.java │ │ │ │ ├── LedOff.java │ │ │ │ ├── TempCommand.java │ │ │ │ ├── ImageModeDecoder.java │ │ │ │ ├── ActivateAllSymbologies.java │ │ │ │ ├── StartSession.java │ │ │ │ ├── StopSession.java │ │ │ │ ├── MultipacketAck.java │ │ │ │ ├── Ack.java │ │ │ │ ├── SetPickListMode.java │ │ │ │ ├── InitCommand.java │ │ │ │ ├── LedOn.java │ │ │ │ ├── Nack.java │ │ │ │ ├── RequestRevision.java │ │ │ │ ├── CommandExpectingAck.java │ │ │ │ ├── CapabilitiesRequest.java │ │ │ │ ├── CommandExpectingNothing.java │ │ │ │ ├── ParamSend.java │ │ │ │ └── ManagementCommandGetBufferSize.java │ │ │ │ ├── parsers │ │ │ │ ├── AckParser.java │ │ │ │ ├── ScannerInitParser.java │ │ │ │ ├── ReplyRevisionParser.java │ │ │ │ ├── PayloadParser.java │ │ │ │ ├── GenericParser.java │ │ │ │ ├── EventParser.java │ │ │ │ ├── BarcodeParser.java │ │ │ │ ├── CapabilitiesParser.java │ │ │ │ └── ErrorParser.java │ │ │ │ ├── ssi │ │ │ │ ├── SsiStatus.java │ │ │ │ └── SsiMonoPacketWrapper.java │ │ │ │ └── SsiOverSppParser.java │ │ └── AndroidManifest.xml │ └── test │ │ └── java │ │ └── android │ │ └── util │ │ └── Log.java └── build.gradle ├── enioka_scan_generalscan ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── enioka │ │ │ └── scanner │ │ │ └── sdk │ │ │ └── generalscan │ │ │ ├── commands │ │ │ ├── Bell.java │ │ │ ├── CloseRead.java │ │ │ ├── OpenRead.java │ │ │ ├── EnableBarcodeSuffix.java │ │ │ ├── SetBeepLevel.java │ │ │ ├── GetDeviceId.java │ │ │ ├── GetBatteryLevel.java │ │ │ └── BaseCommandNoAck.java │ │ │ ├── data │ │ │ └── DeviceId.java │ │ │ └── DataIndex.java │ │ └── AndroidManifest.xml └── build.gradle ├── enioka_scan_zebra_dw ├── src │ └── main │ │ ├── res │ │ └── values │ │ │ └── strings.xml │ │ ├── java │ │ └── com │ │ │ └── enioka │ │ │ └── scanner │ │ │ └── sdk │ │ │ └── zebra │ │ │ └── dw │ │ │ ├── ZebraDwProvider.java │ │ │ └── ZebraDwIntents.java │ │ └── AndroidManifest.xml └── build.gradle ├── enioka_scan_postech ├── src │ └── main │ │ └── java │ │ ├── com │ │ └── enioka │ │ │ └── scanner │ │ │ └── sdk │ │ │ └── postech │ │ │ ├── data │ │ │ └── DeviceName.java │ │ │ └── commands │ │ │ └── GetDeviceName.java │ │ └── AndroidManifest.xml └── build.gradle ├── .gitignore ├── enioka_scan_athesi_rd50te ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── enioka │ │ │ └── scanner │ │ │ └── sdk │ │ │ └── athesi │ │ │ └── RD50TE │ │ │ ├── AthesiRD50TEIntents.java │ │ │ └── AthesiRD50TEProvider.java │ │ └── AndroidManifest.xml └── build.gradle ├── enioka_scan_athesi_spa43lte ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── enioka │ │ └── scanner │ │ └── sdk │ │ └── athesi │ │ └── SPA43LTE │ │ └── AthesiSPA43LTEProvider.java └── build.gradle ├── gradle.properties ├── enioka_scan_bluebird ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── enioka │ │ └── scanner │ │ └── sdk │ │ └── bluebird │ │ └── BluebirdProvider.java └── build.gradle ├── enioka_scan_proglove ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── enioka │ │ │ └── scanner │ │ │ └── sdk │ │ │ └── proglove │ │ │ └── ProgloveProvider.java │ │ └── AndroidManifest.xml └── build.gradle ├── enioka_scan_honeywelloss_integrated ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── enioka │ │ │ └── scanner │ │ │ └── sdk │ │ │ └── honeywelloss │ │ │ └── integrated │ │ │ └── HoneywellOssIntegratedScannerProvider.java │ │ └── AndroidManifest.xml └── build.gradle ├── NOTICE.md └── settings.gradle /enioka_scan/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /demoscannerapp/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /enioka_scan_m3/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /enioka_scan_mock/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /enioka_scan_honeywell/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /enioka_scan_koamtac/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /enioka_scan_m3/libs/.gitignore: -------------------------------------------------------------------------------- 1 | M3*.jar 2 | -------------------------------------------------------------------------------- /enioka_scan_zebra/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /enioka_scan/multidex.pro: -------------------------------------------------------------------------------- 1 | -keep class **Test { *; } -------------------------------------------------------------------------------- /npm_integration_frameworks/reactnative/.nvmrc: -------------------------------------------------------------------------------- 1 | v18 2 | -------------------------------------------------------------------------------- /enioka_scan_koamtac/libs/.gitignore: -------------------------------------------------------------------------------- 1 | kdcreader*.jar 2 | -------------------------------------------------------------------------------- /enioka_scan_honeywell/libs/.gitignore: -------------------------------------------------------------------------------- 1 | DataCollection*.aar 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "fastlane" 4 | -------------------------------------------------------------------------------- /enioka_scan_zebra/libs/.gitignore: -------------------------------------------------------------------------------- 1 | barcode_scanner_library*.aar 2 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | myst-parser==2.0.0 2 | sphinx==7.2.6 3 | sphinx-rtd-theme==2.0.0 -------------------------------------------------------------------------------- /docs/pictures/crop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/docs/pictures/crop.png -------------------------------------------------------------------------------- /docs/pictures/stretch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/docs/pictures/stretch.png -------------------------------------------------------------------------------- /demoscannerapp/playstore/short_description.txt: -------------------------------------------------------------------------------- 1 | Integration library for all your Android barcode scanner integration needs 2 | -------------------------------------------------------------------------------- /docs/pictures/black_bars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/docs/pictures/black_bars.png -------------------------------------------------------------------------------- /npm_integration_frameworks/reactnative/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "exclude": ["lib"] 4 | } 5 | -------------------------------------------------------------------------------- /demoscannerapp/playstore/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/playstore/icon.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /demoscannerapp/playstore/frature_graphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/playstore/frature_graphic.png -------------------------------------------------------------------------------- /fastlane/Appfile: -------------------------------------------------------------------------------- 1 | json_key_file("service-account.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one 2 | -------------------------------------------------------------------------------- /npm_integration_frameworks/reactnative/android/src/main/AndroidManifestNew.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/ScannerLedColor.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api; 2 | 3 | public enum ScannerLedColor { 4 | RED, GREEN 5 | } 6 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demoscannerapp/playstore/phone_screenshots/home_activity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/playstore/phone_screenshots/home_activity.png -------------------------------------------------------------------------------- /demoscannerapp/playstore/phone_screenshots/scan_activity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/playstore/phone_screenshots/scan_activity.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demoscannerapp/playstore/phone_screenshots/camera_activity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/playstore/phone_screenshots/camera_activity.png -------------------------------------------------------------------------------- /enioka_scan_camera/src/main/java/com/enioka/scanner/sdk/camera/CameraApiLevel.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.camera; 2 | 3 | public enum CameraApiLevel { 4 | Camera1, Camera2 5 | } 6 | -------------------------------------------------------------------------------- /demoscannerapp/playstore/phone_screenshots/settings_activity_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/playstore/phone_screenshots/settings_activity_1.png -------------------------------------------------------------------------------- /demoscannerapp/playstore/phone_screenshots/settings_activity_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/playstore/phone_screenshots/settings_activity_2.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enioka-Haute-Couture/enioka_scan/HEAD/demoscannerapp/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/api/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * API of the BT SPP SDK. For now, this is a PRIVATE API as it needs stabilization. 3 | */ 4 | package com.enioka.scanner.bt.api; 5 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/data/FirmwareVersion.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.data; 2 | 3 | public class FirmwareVersion { 4 | } 5 | -------------------------------------------------------------------------------- /npm_integration_frameworks/reactnative/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /demoscannerapp/playstore/attributions.txt: -------------------------------------------------------------------------------- 1 | - App Icon by Ecommdesign (https://iconscout.com/free-icon/barcode-159) 2 | - Feature Graphic generated with Hotpot (https://hotpot.ai/templates/google-play-feature-graphic/11) 3 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/manager/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The SPP bluetooth manager - everything the library needs to make the BT SPP SDK work. 3 | */ 4 | package com.enioka.scanner.bt.manager; 5 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/values/dimen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12dp 4 | 10sp 5 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/manager/bleserial/BleSubscriptionType.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.manager.bleserial; 2 | 3 | public enum BleSubscriptionType { 4 | NOTIFICATION, 5 | INDICATION 6 | } 7 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | build: 4 | os: ubuntu-22.04 5 | tools: 6 | python: "3.11" 7 | 8 | python: 9 | install: 10 | - requirements: docs/requirements.txt 11 | 12 | sphinx: 13 | configuration: docs/conf.py -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/callbacks/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Callbacks and handlers used by the different APIs. Must be wrapped by their equivalent proxy before use. 3 | */ 4 | package com.enioka.scanner.api.callbacks; -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/manager/bleserial/GattAttributeType.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.manager.bleserial; 2 | 3 | public enum GattAttributeType { 4 | CHARACTERISTIC, 5 | SERVICE, 6 | DESCRIPTOR 7 | } 8 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/data/Ack.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.data; 2 | 3 | public class Ack { 4 | @Override 5 | public String toString() { 6 | return "ACK"; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/exc/ScannerException.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.exc; 2 | 3 | /** 4 | * Base exception for all API exceptions of this module. 5 | */ 6 | public class ScannerException extends RuntimeException { 7 | } 8 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Bluetooth SPP SDK. Public API is in "api" package, and everything needed to make the SDK behind the scenes inside the "manager" package. 3 | */ 4 | package com.enioka.scanner.bt; -------------------------------------------------------------------------------- /docs/guides/index.md: -------------------------------------------------------------------------------- 1 | # Guides 2 | 3 | This sections contains quick guides to reach specific desired outcomes without having to dig too 4 | deep in the [API reference](../api/index.md). 5 | 6 | :::{toctree} 7 | :maxdepth: 1 8 | 9 | custom_layout 10 | ::: -------------------------------------------------------------------------------- /enioka_scan/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /npm_integration_frameworks/reactnative/android/gradle.properties: -------------------------------------------------------------------------------- 1 | ActivityStarter_kotlinVersion=1.7.0 2 | ActivityStarter_minSdkVersion=19 3 | ActivityStarter_targetSdkVersion=28 4 | ActivityStarter_compileSdkVersion=28 5 | ActivityStarter_ndkversion=21.4.7075529 6 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/exc/NoLaserScanner.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.exc; 2 | 3 | /** 4 | * Thrown when there is no scanner available (you should use the camera instead). 5 | */ 6 | public class NoLaserScanner extends ScannerException { 7 | } 8 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/data/ScannerInit.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.data; 2 | 3 | public class ScannerInit { 4 | @Override 5 | public String toString() { 6 | return "SCANNER_INIT"; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /npm_integration_frameworks/cordova-capacitor/www/main.js: -------------------------------------------------------------------------------- 1 | var exec = require('cordova/exec'); 2 | 3 | window.startActivity = function (params, successCallback, errorCallback) { 4 | exec(successCallback, errorCallback, "ActivityStarterPlugin", "startActivity", [params]); 5 | }; -------------------------------------------------------------------------------- /enioka_scan_generalscan/src/main/java/com/enioka/scanner/sdk/generalscan/commands/Bell.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.generalscan.commands; 2 | 3 | public class Bell extends BaseCommandNoAck { 4 | public Bell() { 5 | this.stringCommand = "{G1068}{G2014}"; 6 | 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Sep 26 09:23:23 CEST 2023 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /enioka_scan_zebra_dw/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | com.enioka.scanners.zebra.dw.intent.callback.name 3 | 4 | 5 | -------------------------------------------------------------------------------- /npm_integration_frameworks/reactnative/src/index.tsx: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const ActivityStarterModule = NativeModules.ActivityStarterModule 4 | 5 | export function startActivityByName(targetActivity: String): void { 6 | ActivityStarterModule.startActivityByName(targetActivity); 7 | return; 8 | } 9 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /enioka_scan_zebra/src/main/java/com/enioka/scanner/sdk/zebra/BtZebraConnectionCallback.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebra; 2 | 3 | /** 4 | * A helper to interact between main thread and connection thread. 5 | */ 6 | public interface BtZebraConnectionCallback { 7 | void onSuccess(); 8 | 9 | void onFailure(); 10 | } 11 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/AimOn.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | public class AimOn extends CommandExpectingAck { 6 | public AimOn() { 7 | super(SsiCommand.AIM_ON.getOpCode()); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/manager/common/OnConnectedCallback.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.manager.common; 2 | 3 | /** 4 | * A callback used when a device has succeeded or failed to connect. 5 | */ 6 | public interface OnConnectedCallback { 7 | void connected(BluetoothScannerInternal scanner); 8 | 9 | void failed(); 10 | } -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/data/RsmAttribute.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.data; 2 | 3 | public class RsmAttribute { 4 | public String data; 5 | public int id; 6 | 7 | @Override 8 | public String toString() { 9 | return String.format("%-6s - %s", id, data); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/ScanEnable.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | public class ScanEnable extends CommandExpectingAck { 6 | public ScanEnable() { 7 | super(SsiCommand.SCAN_ENABLE.getOpCode()); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /enioka_scan_camera/src/main/res/drawable/text_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/FlushQueue.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | public class FlushQueue extends CommandExpectingNothing { 6 | public FlushQueue() { 7 | super(SsiCommand.FLUSH_QUEUE.getOpCode()); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/ScanDisable.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | public class ScanDisable extends CommandExpectingAck { 6 | public ScanDisable() { 7 | super(SsiCommand.SCAN_DISABLE.getOpCode()); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /enioka_scan_camera/src/main/java/com/enioka/scanner/sdk/camera/CroppedPicture.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.camera; 2 | 3 | /** 4 | * Data that must be analysed by a {@link FrameAnalyser}. It must be already cropped and rotated. 5 | */ 6 | class CroppedPicture { 7 | byte[] barcode; 8 | int croppedDataWidth, croppedDataHeight; 9 | long lumaSum = 0L; 10 | } 11 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/Beep.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | public class Beep extends CommandExpectingAck { 6 | public Beep(byte beepCode) { 7 | super(SsiCommand.BEEP.getOpCode(), new byte[]{beepCode}); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/LedOff.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | public class LedOff extends CommandExpectingAck { 6 | public LedOff() { 7 | super(SsiCommand.LED_OFF.getOpCode(), new byte[]{(byte) 0xFF}); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/TempCommand.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | public class TempCommand extends CommandExpectingNothing { 6 | public TempCommand() { 7 | super(SsiCommand.TEMP_COMMAND.getOpCode()); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/values/dimen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24dp 4 | 16dp 5 | 16dp 6 | 12dp 7 | 16dp 8 | -------------------------------------------------------------------------------- /npm_integration_frameworks/reactnative/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | nmHoistingLimits: workspaces 3 | 4 | plugins: 5 | - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs 6 | spec: "@yarnpkg/plugin-interactive-tools" 7 | - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs 8 | spec: "@yarnpkg/plugin-workspace-tools" 9 | 10 | yarnPath: .yarn/releases/yarn-3.6.1.cjs 11 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/ImageModeDecoder.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | public class ImageModeDecoder extends CommandExpectingAck { 6 | public ImageModeDecoder() { 7 | super(SsiCommand.IMAGER_MODE.getOpCode(), new byte[]{0x00}); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/manager/classicserial/OnStreamConnectedCallback.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.manager.classicserial; 2 | 3 | import android.bluetooth.BluetoothSocket; 4 | 5 | /** 6 | * Called when a stream has failed or succeeded to connect. 7 | */ 8 | interface OnStreamConnectedCallback { 9 | void connected(BluetoothSocket bluetoothSocket); 10 | 11 | void failed(); 12 | } -------------------------------------------------------------------------------- /enioka_scan_generalscan/src/main/java/com/enioka/scanner/sdk/generalscan/commands/CloseRead.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.generalscan.commands; 2 | 3 | /** 4 | * Signal the scanner that a command is coming. Must be in its own packet, so different command. 5 | */ 6 | public class CloseRead extends BaseCommandNoAck { 7 | public CloseRead() { 8 | this.stringCommand = "{G1009}"; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /enioka_scan_postech/src/main/java/com/enioka/scanner/sdk/postech/data/DeviceName.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.postech.data; 2 | 3 | public class DeviceName { 4 | private String id; 5 | 6 | public DeviceName(String data) { 7 | this.id = data.replace("[", "").replace("]", ""); 8 | } 9 | 10 | @Override 11 | public String toString() { 12 | return this.id; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/callbacks/ProviderDiscoveredCallback.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api.callbacks; 2 | 3 | /** 4 | * Callback handling the discovery of scanner providers by {@link com.enioka.scanner.LaserScanner} 5 | */ 6 | public interface ProviderDiscoveredCallback { 7 | /** 8 | * Called once all providers are discovered. 9 | */ 10 | void onDiscoveryDone(); 11 | } 12 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/proxies/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Callback proxies serve the purpose of centralizing jumps to UI-thread by wrapping their respective callbacks and calling the UI-thread. 3 | * This way, regular callbacks and other methods do not have to worry about handling this, handlers just need to be wrapped before being passed as parameters. 4 | */ 5 | package com.enioka.scanner.api.proxies; -------------------------------------------------------------------------------- /enioka_scan_generalscan/src/main/java/com/enioka/scanner/sdk/generalscan/data/DeviceId.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.generalscan.data; 2 | 3 | public class DeviceId { 4 | private String id; 5 | 6 | public DeviceId(String data) { 7 | this.id = data.replace("[", "").replace("]", ""); 8 | } 9 | 10 | @Override 11 | public String toString() { 12 | return this.id; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/api/MessageRejectionReason.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.api; 2 | 3 | /** 4 | * Why a message cannot be processed. (normalization attempt). 5 | */ 6 | public enum MessageRejectionReason { 7 | CHECKSUM_FAILURE, 8 | UNDESIRED_MESSAGE, 9 | INVALID_PARAMETER, 10 | INVALID_OPERATION, 11 | CANNOT_PARSE, 12 | DENIED, 13 | OTHER, 14 | UNKNOWN 15 | } 16 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/ActivateAllSymbologies.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | public class ActivateAllSymbologies extends CommandExpectingNothing { 6 | public ActivateAllSymbologies() { 7 | super(SsiCommand.CHANGE_ALL_CODE_TYPES.getOpCode(), new byte[]{0x01}); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/StartSession.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | /** 6 | * Equivalent to pulling the trigger. 7 | */ 8 | public class StartSession extends CommandExpectingAck { 9 | public StartSession() { 10 | super(SsiCommand.START_SESSION.getOpCode()); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/StopSession.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | /** 6 | * Equivalent to releasing the trigger. 7 | */ 8 | public class StopSession extends CommandExpectingAck { 9 | public StopSession() { 10 | super(SsiCommand.STOP_SESSION.getOpCode()); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /enioka_scan_generalscan/src/main/java/com/enioka/scanner/sdk/generalscan/commands/OpenRead.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.generalscan.commands; 2 | 3 | /** 4 | * Signal the scanner that a command is done and normal operations can resume. Must be in its own packet, so different command. 5 | */ 6 | public class OpenRead extends BaseCommandNoAck { 7 | public OpenRead() { 8 | this.stringCommand = "{G1008}"; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/parsers/AckParser.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.parsers; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.data.Ack; 4 | 5 | /** 6 | * Responsible for handling ACK data 7 | */ 8 | public class AckParser implements PayloadParser { 9 | @Override 10 | public Ack parseData(final byte[] dataBuffer) { 11 | return new Ack(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/MultipacketAck.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | /** 6 | * A multipacket segment acknowledgment. 7 | */ 8 | public class MultipacketAck extends CommandExpectingNothing { 9 | public MultipacketAck() { 10 | super(SsiCommand.MULTIPACKET_ACK.getOpCode()); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /enioka_scan_generalscan/src/main/java/com/enioka/scanner/sdk/generalscan/commands/EnableBarcodeSuffix.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.generalscan.commands; 2 | 3 | /** 4 | * The library needs suffix on all barcode returns, including barcode data (only place where it is optional). 5 | */ 6 | public class EnableBarcodeSuffix extends BaseCommandNoAck { 7 | public EnableBarcodeSuffix() { 8 | this.stringCommand = "{2043/\r\n}"; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /enioka_scan_camera/src/main/java/com/enioka/scanner/sdk/camera/CameraReader.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.camera; 2 | 3 | /** 4 | * The different barcode reading libraries available. 5 | */ 6 | public enum CameraReader { 7 | /** 8 | * Use ZBar. It is by far the fastest reader available and is the default. 9 | */ 10 | ZBAR, 11 | /** 12 | * Use Zebra Crossing (ZXing), a slow but more accurate reader. 13 | */ 14 | ZXING 15 | } 16 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/Ack.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | /** 6 | * A message or segment acknowledgment. 7 | */ 8 | public class Ack extends CommandExpectingNothing { 9 | public Ack(boolean useHostAck) { 10 | super(useHostAck ? SsiCommand.HOST_ACK.getOpCode() : SsiCommand.CMD_ACK.getOpCode()); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/SetPickListMode.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | /** 4 | * Set picklist. 5 | */ 6 | public class SetPickListMode extends ParamSend { 7 | public SetPickListMode(byte mode) { 8 | super(402, mode); 9 | if (mode < 0 || mode > 2) { 10 | throw new IllegalArgumentException("picklist mode can only be 0/1/2"); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/data/Event.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.data; 2 | 3 | import com.enioka.scanner.bt.api.Helpers; 4 | 5 | public class Event { 6 | private byte[] data; 7 | 8 | public Event(byte[] data) { 9 | this.data = data; 10 | } 11 | 12 | @Override 13 | public String toString() { 14 | return "Event code " + Helpers.byteArrayToHex(data, data.length); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/parsers/ScannerInitParser.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.parsers; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.data.ScannerInit; 4 | 5 | /** 6 | * Responsible for handling ACK data 7 | */ 8 | public class ScannerInitParser implements PayloadParser { 9 | @Override 10 | public ScannerInit parseData(final byte[] dataBuffer) { 11 | return new ScannerInit(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/manager/bleserial/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Most BLE scanners are actually using some sort of serial emulation instead of using GATT attributes as they were intended. 3 | * This allows device constructors to re-use their existing proprietary serial protocols and have the same logic in BLE or Classic mode. 4 | * This package contains utilities to help present a BLE device as a stream. 5 | */ 6 | package com.enioka.scanner.bt.manager.bleserial; 7 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/pause_fill.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/parsers/ReplyRevisionParser.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.parsers; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.data.ReplyRevision; 4 | 5 | /** 6 | * Responsible for handling 7 | */ 8 | public class ReplyRevisionParser implements PayloadParser { 9 | @Override 10 | public ReplyRevision parseData(final byte[] dataBuffer) { 11 | return new ReplyRevision(dataBuffer); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /enioka_scan_generalscan/src/main/java/com/enioka/scanner/sdk/generalscan/DataIndex.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.generalscan; 2 | 3 | import com.enioka.scanner.sdk.generalscan.data.DeviceId; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | /** 9 | * An index for all data parser classes. 10 | */ 11 | class DataIndex { 12 | static Map> parsers = new HashMap<>(); 13 | 14 | static { 15 | parsers.put("[", DeviceId.class); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /enioka_scan_camera/src/main/java/com/enioka/scanner/sdk/camera/FrameAnalysisContext.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.camera; 2 | 3 | /** 4 | * All the data needed for a frame analysis. 5 | * It also contains all the necessary data for buffer reuse between frames (closing Images, ...)
6 | * TODO: merge with CroppedPicture one day. 7 | */ 8 | class FrameAnalysisContext { 9 | CroppedPicture croppedPicture; 10 | 11 | T originalImage; // byte[] for CameraV1, android.media.Image for CameraV2 12 | } 13 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/parsers/PayloadParser.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.parsers; 2 | 3 | /** 4 | * Parser specific to a kind of message (opcode). 5 | * 6 | * @param 7 | */ 8 | public interface PayloadParser { 9 | 10 | /** 11 | * @param dataBuffer data content of the message to parse, headers and checksum excluded. 12 | * @return null means no meaningful data found. 13 | */ 14 | T parseData(final byte[] dataBuffer); 15 | } 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | .project 4 | 5 | demoscannerapp/debug.keystore 6 | 7 | *.iml 8 | .gradle 9 | /local.properties 10 | /.idea/workspace.xml 11 | /.idea/libraries 12 | .DS_Store 13 | **/build/ 14 | **/debug/ 15 | **/release/ 16 | /captures 17 | .externalNativeBuild 18 | 19 | npm_integration_frameworks/reactnative/android/.settings 20 | npm_integration_frameworks/reactnative/android/.classpath 21 | npm_integration_frameworks/reactnative/lib 22 | 23 | **/node_modules 24 | **/.yarn/cache 25 | **/.yarn/install-state.gz 26 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/search.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/done.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/java/com/enioka/scanner/demo/EspressoSemaphore.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.demo; 2 | 3 | import androidx.test.espresso.idling.CountingIdlingResource; 4 | 5 | public class EspressoSemaphore { 6 | public static CountingIdlingResource countingIdlingResource = new CountingIdlingResource("settings"); 7 | 8 | public static void increment() { 9 | countingIdlingResource.increment(); 10 | } 11 | 12 | public static void decrement() { 13 | countingIdlingResource.decrement(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/parsers/GenericParser.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.parsers; 2 | 3 | import com.enioka.scanner.bt.api.Helpers; 4 | 5 | /** 6 | * CAPABILITIES_REPLY parser, also used for other data types with no dedicated parsers for now. 7 | */ 8 | public class GenericParser implements PayloadParser { 9 | @Override 10 | public String parseData(final byte[] dataBuffer) { 11 | return Helpers.byteArrayToHex(dataBuffer, dataBuffer.length); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/arrow_left.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/cross.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/parsers/EventParser.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.parsers; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.data.Event; 4 | 5 | /** 6 | * Responsible for handling NAK data 7 | */ 8 | public class EventParser implements PayloadParser { 9 | @Override 10 | public Event parseData(final byte[] dataBuffer) { 11 | if (dataBuffer.length < 1) { 12 | return null; 13 | } 14 | 15 | return new Event(new byte[]{dataBuffer[0]}); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/manager/common/BluetoothScannerInternal.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.manager.common; 2 | 3 | import com.enioka.scanner.bt.api.BtSppScannerProvider; 4 | import com.enioka.scanner.bt.api.BluetoothScanner; 5 | 6 | /** 7 | * An abstraction used internally to address the different kinds of BT devices (BLE TIO, classic) 8 | */ 9 | public interface BluetoothScannerInternal extends BluetoothScanner { 10 | void connect(final OnConnectedCallback callback); 11 | 12 | void setProvider(BtSppScannerProvider provider); 13 | } 14 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/activities/ManualInputItem.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.activities; 2 | 3 | /** 4 | * Items of AutoCompleteText in ManualInputFragment 5 | */ 6 | public class ManualInputItem { 7 | private String text; 8 | private boolean done; 9 | 10 | public ManualInputItem(String text, boolean done) { 11 | this.text = text; 12 | this.done = done; 13 | } 14 | 15 | public boolean isDone() { 16 | return this.done; 17 | } 18 | 19 | public String getText() { 20 | return this.text; 21 | } 22 | } -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/flash.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/crop.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/commands/Cleanup.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | 5 | public class Cleanup implements Command { 6 | @Override 7 | public byte[] getCommand() { 8 | // "!" 9 | return new byte[]{33}; 10 | } 11 | 12 | @Override 13 | public Class getReturnType() { 14 | return null; 15 | } 16 | 17 | @Override 18 | public int getTimeOut() { 19 | return 1000; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/InitCommand.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | /** 6 | * Signal the device that we are a barcode scanning application host type. 7 | */ 8 | public class InitCommand extends CommandExpectingAck { 9 | public InitCommand() { 10 | super(SsiCommand.SCANNER_INIT_COMMAND.getOpCode(), new byte[]{0x00, 0x02, 0x00, 0x05}); 11 | } 12 | 13 | @Override 14 | public int getTimeOut() { 15 | return 10000; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/commands/Beep.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | 5 | public class Beep implements Command { 6 | @Override 7 | public byte[] getCommand() { 8 | // SYN BELL CR 9 | return new byte[]{0x16, 0x07, 0x0D}; 10 | } 11 | 12 | @Override 13 | public Class getReturnType() { 14 | return null; 15 | } 16 | 17 | @Override 18 | public int getTimeOut() { 19 | return 1000; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/upc.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan_camera/src/main/java/com/enioka/scanner/sdk/camera/ZBarScanView.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.camera; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | /** 7 | * Please use {@link CameraBarcodeScanViewV1} instead which is identical. Only here for compatibility. 8 | */ 9 | @Deprecated 10 | public class ZBarScanView extends CameraBarcodeScanViewV1 { 11 | public ZBarScanView(Context context) { 12 | super(context); 13 | } 14 | 15 | public ZBarScanView(Context context, AttributeSet attributeSet) { 16 | super(context, attributeSet); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/callbacks/ScannerDataCallback.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api.callbacks; 2 | 3 | import com.enioka.scanner.api.Scanner; 4 | import com.enioka.scanner.data.Barcode; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Callback to deal with data read by the scanner. 10 | */ 11 | public interface ScannerDataCallback { 12 | 13 | /** 14 | * Called whenever data is scanned by the scanner. 15 | * @param s The scanner that read the data. 16 | * @param data The data read by the reader. 17 | */ 18 | void onData(final Scanner s, final List data); 19 | } 20 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/api/ScannerDataParser.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.api; 2 | 3 | /** 4 | * The interface through which data from the scanner is poured into the device-specific adapter. 5 | */ 6 | public interface ScannerDataParser { 7 | /** 8 | * Do something with the data returned by the bluetooth device. Not called on the UI thread. 9 | * 10 | * @param buffer byte array containing the data from 0 to dataLength 11 | * @param dataLength number of useful bytes inside the buffer 12 | */ 13 | ParsingResult parse(byte[] buffer, int offset, int dataLength); 14 | } 15 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/upc.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/commands/ActivateTrigger.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | 5 | public class ActivateTrigger implements Command { 6 | @Override 7 | public byte[] getCommand() { 8 | // SYN T CR 9 | return new byte[]{0x16, 0x54, 0x0D}; 10 | } 11 | 12 | @Override 13 | public Class getReturnType() { 14 | return null; 15 | } 16 | 17 | @Override 18 | public int getTimeOut() { 19 | return 1000; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/commands/DeactivateTrigger.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | 5 | public class DeactivateTrigger implements Command { 6 | @Override 7 | public byte[] getCommand() { 8 | // SYN U CR 9 | return new byte[]{0x16, 0x55, 0x0D}; 10 | } 11 | 12 | @Override 13 | public Class getReturnType() { 14 | return null; 15 | } 16 | 17 | @Override 18 | public int getTimeOut() { 19 | return 1000; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/api/Helpers.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.api; 2 | 3 | public final class Helpers { 4 | 5 | private Helpers(){} 6 | 7 | public static String byteArrayToHex(byte[] buffer, int length) { 8 | return byteArrayToHex(buffer, 0, length); 9 | } 10 | 11 | public static String byteArrayToHex(byte[] buffer, int offset, int length) { 12 | StringBuilder sb = new StringBuilder(length * 2); 13 | for (int i = offset; i < offset + length; i++) { 14 | sb.append(String.format("%02x ", buffer[i])); 15 | } 16 | return sb.toString(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /enioka_scan_camera/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/black_bars.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /enioka_scan_generalscan/src/main/java/com/enioka/scanner/sdk/generalscan/commands/SetBeepLevel.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.generalscan.commands; 2 | 3 | /** 4 | * This does not work - FNC3+205080+level is a native Zebra command, understood by the Zebra decoder but not understood by the device controller. 5 | */ 6 | public class SetBeepLevel extends BaseCommandNoAck { 7 | public SetBeepLevel(int level) { 8 | if (level < 0) { 9 | level = 0; 10 | } 11 | if (level > 2) { 12 | level = 2; 13 | } 14 | level = 2 - level; 15 | 16 | this.stringCommand = "É205080" + level; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/callbacks/ScannerInitCallback.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api.callbacks; 2 | 3 | import com.enioka.scanner.api.Scanner; 4 | 5 | /** 6 | * Callback handling scanner init events 7 | */ 8 | public interface ScannerInitCallback { 9 | 10 | /** 11 | * Called whenever a scanner successfully connected. 12 | * @param s The connected scanner. 13 | */ 14 | void onConnectionSuccessful(final Scanner s); 15 | 16 | /** 17 | * Called whenever a scanner could not connect. 18 | * @param s The scanner that could not connect. 19 | */ 20 | void onConnectionFailure(final Scanner s); 21 | } 22 | -------------------------------------------------------------------------------- /enioka_scan_generalscan/src/main/java/com/enioka/scanner/sdk/generalscan/commands/GetDeviceId.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.generalscan.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | import com.enioka.scanner.sdk.generalscan.data.DeviceId; 5 | 6 | public class GetDeviceId implements Command { 7 | 8 | @Override 9 | public byte[] getCommand() { 10 | return "{G1065}".getBytes(); 11 | } 12 | 13 | @Override 14 | public Class getReturnType() { 15 | return DeviceId.class; 16 | } 17 | 18 | @Override 19 | public int getTimeOut() { 20 | return 1000; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /enioka_scan_postech/src/main/java/com/enioka/scanner/sdk/postech/commands/GetDeviceName.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.postech.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | import com.enioka.scanner.sdk.postech.data.DeviceName; 5 | 6 | public class GetDeviceName implements Command { 7 | 8 | @Override 9 | public byte[] getCommand() { 10 | return "{GB100}{G1000?}".getBytes(); 11 | } 12 | 13 | @Override 14 | public Class getReturnType() { 15 | return DeviceName.class; 16 | } 17 | 18 | @Override 19 | public int getTimeOut() { 20 | return 1000; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/info.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /npm_integration_frameworks/cordova-capacitor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@enioka/enioka-scan-cordova-capacitor-integration", 3 | "version": "0.1.0", 4 | "description": "enioka scan plugin cordova", 5 | "main": "main.js", 6 | "cordova": { 7 | "id": "enioka-scan-cordova-capacitor-integration", 8 | "platforms": [ 9 | "android" 10 | ] 11 | }, 12 | "keywords": [ 13 | "enioka", 14 | "enioka-scan", 15 | "scanner", 16 | "integration-layer", 17 | "capacitor", 18 | "cordova", 19 | "plugin" 20 | ], 21 | "author": "enioka", 22 | "license": "Apache-2.0" 23 | } 24 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/api/BtSppScannerProviderServiceBinder.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.api; 2 | 3 | import android.os.Binder; 4 | 5 | /** 6 | * Boilerplate code for bound services. MUST be used by {@link BtSppScannerProvider} implementations. 7 | */ 8 | public class BtSppScannerProviderServiceBinder extends Binder { 9 | private final BtSppScannerProvider providerInstance; 10 | 11 | public BtSppScannerProviderServiceBinder(BtSppScannerProvider providerInstance) { 12 | this.providerInstance = providerInstance; 13 | } 14 | 15 | public BtSppScannerProvider getService() { 16 | return providerInstance; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/commands/DisableAimer.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | 5 | public class DisableAimer implements Command { 6 | @Override 7 | public byte[] getCommand() { 8 | // SCNAIM0 / 2 9 | // SYN M CR ... 0 ! 10 | return new byte[]{22, 77, 13, 83, 67, 78, 65, 73, 77, 48, 33}; 11 | } 12 | 13 | @Override 14 | public Class getReturnType() { 15 | return null; 16 | } 17 | 18 | @Override 19 | public int getTimeOut() { 20 | return 1000; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/commands/EnableAimer.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | 5 | public class EnableAimer implements Command { 6 | @Override 7 | public byte[] getCommand() { 8 | // SCNAIM0 / 2 9 | // SYN M CR ... 2 ! 10 | return new byte[]{22, 77, 13, 83, 67, 78, 65, 73, 77, 50, 33}; 11 | } 12 | 13 | @Override 14 | public Class getReturnType() { 15 | return null; 16 | } 17 | 18 | @Override 19 | public int getTimeOut() { 20 | return 1000; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/data/RsmAttributeReply.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.data; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class RsmAttributeReply { 7 | public List attributes = new ArrayList<>(); 8 | 9 | @Override 10 | public String toString() { 11 | StringBuilder sb = new StringBuilder(); 12 | sb.append("RSM attributes \n"); 13 | for (RsmAttribute attr : attributes) { 14 | sb.append("\t"); 15 | sb.append(attr.toString()); 16 | sb.append("\n"); 17 | } 18 | 19 | return sb.toString(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #C6D118 7 | #00b41b 8 | #A8FFB5 9 | #FFA8A8 10 | #808080 11 | #FF0000 12 | #373737 13 | #EADDFF 14 | 15 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/stretch.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/commands/EnableBarcodeMetadata.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | 5 | public class EnableBarcodeMetadata implements Command { 6 | @Override 7 | public byte[] getCommand() { 8 | // DECHDR1 / 0 9 | // SYN M CR ... 1 . 10 | return new byte[]{22, 77, 13, 68, 69, 67, 72, 68, 82, 49, 46}; 11 | } 12 | 13 | @Override 14 | public Class getReturnType() { 15 | return null; 16 | } 17 | 18 | @Override 19 | public int getTimeOut() { 20 | return 1000; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/commands/EnableIllumination.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | 5 | public class EnableIllumination implements Command { 6 | @Override 7 | public byte[] getCommand() { 8 | // SCNLED0 / 1 9 | // SYN M CR S C N L E D 1 ! 10 | return new byte[]{22, 77, 13, 83, 67, 78, 76, 69, 68, 49, 33}; 11 | } 12 | 13 | @Override 14 | public Class getReturnType() { 15 | return null; 16 | } 17 | 18 | @Override 19 | public int getTimeOut() { 20 | return 1000; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/commands/DisableIllumination.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | 5 | public class DisableIllumination implements Command { 6 | @Override 7 | public byte[] getCommand() { 8 | // SCNLED0 / 1 9 | // SYN M CR S C N L E D 0 ! 10 | return new byte[]{22, 77, 13, 83, 67, 78, 76, 69, 68, 48, 33}; 11 | } 12 | 13 | @Override 14 | public Class getReturnType() { 15 | return null; 16 | } 17 | 18 | @Override 19 | public int getTimeOut() { 20 | return 1000; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /enioka_scan_mock/src/test/java/android/util/Log.java: -------------------------------------------------------------------------------- 1 | package android.util; 2 | 3 | public class Log { 4 | public static int d(String tag, String msg) { 5 | System.out.println("DEBUG: " + tag + ": " + msg); 6 | return 0; 7 | } 8 | 9 | public static int i(String tag, String msg) { 10 | System.out.println("INFO: " + tag + ": " + msg); 11 | return 0; 12 | } 13 | 14 | public static int w(String tag, String msg) { 15 | System.out.println("WARN: " + tag + ": " + msg); 16 | return 0; 17 | } 18 | 19 | public static int e(String tag, String msg) { 20 | System.out.println("ERROR: " + tag + ": " + msg); 21 | return 0; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /enioka_scan_athesi_rd50te/src/main/java/com/enioka/scanner/sdk/athesi/RD50TE/AthesiRD50TEIntents.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.athesi.RD50TE; 2 | 3 | /** 4 | * Intent actions, extras and related constants for the Athesi E5L integrated scanner, observed through android error logs. 5 | */ 6 | public class AthesiRD50TEIntents { 7 | public static final String BARCODE_EVENT = "com.android.serial.BARCODEPORT_RECEIVEDDATA_ACTION"; 8 | public static final String BARCODE_DATA_EXTRA = "DATA"; 9 | public static final String PRESS_TRIGGER = "com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_L_DOWN"; 10 | public static final String RELEASE_TRIGGER = "com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_L_UP"; 11 | } 12 | -------------------------------------------------------------------------------- /npm_integration_frameworks/reactnative/android/src/main/java/com/activitystarter/ActivityStarterPackage.kt: -------------------------------------------------------------------------------- 1 | package com.activitystarter 2 | 3 | import com.facebook.react.ReactPackage 4 | import com.facebook.react.bridge.NativeModule 5 | import com.facebook.react.bridge.ReactApplicationContext 6 | import com.facebook.react.uimanager.ViewManager 7 | 8 | 9 | class ActivityStarterPackage : ReactPackage { 10 | override fun createNativeModules(reactContext: ReactApplicationContext): List { 11 | return listOf(ActivityStarterModule(reactContext)) 12 | } 13 | 14 | override fun createViewManagers(reactContext: ReactApplicationContext): List> { 15 | return emptyList() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/flashlight.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | default_platform(:android) 2 | 3 | platform :android do 4 | 5 | lane :default do 6 | internal 7 | end 8 | 9 | # LANE 1 10 | desc "Publish a new version to the Google Play (INTERNAL)" 11 | lane :internal do 12 | 13 | # Generate AAB file 14 | gradle( 15 | task: "demoscannerapp:bundle", 16 | build_type: "Release" 17 | ) 18 | 19 | # Upload the AAB to play store (internal track) 20 | upload_to_play_store( 21 | package_name: "com.enioka.scanner.demoscannerapp.release", 22 | track: 'internal', 23 | release_status: "draft", 24 | skip_upload_apk: true 25 | ) 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/check_all.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /enioka_scan_generalscan/src/main/java/com/enioka/scanner/sdk/generalscan/commands/GetBatteryLevel.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.generalscan.commands; 2 | 3 | 4 | public class GetBatteryLevel { 5 | 6 | public String getCommand() { 7 | return "{G1066}"; 8 | } 9 | 10 | public void process(byte[] data, int offset, int length) { 11 | /*String res = translateToString(data, offset, length); 12 | String[] segments = res.split("/"); 13 | if (segments.length < 2) { 14 | Log.e(LOG_TAG, "What the hell?"); 15 | return; 16 | } 17 | Log.i(LOG_TAG, segments[2].replace("%]", "") + "% battery");*/ 18 | } 19 | 20 | public void endOfTransmission() { 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /enioka_scan_mock/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /enioka_scan_mock/src/main/java/com/enioka/scanner/sdk/mock/MockProvider.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.mock; 2 | 3 | import android.content.Context; 4 | 5 | import com.enioka.scanner.api.ScannerProvider; 6 | import com.enioka.scanner.api.ScannerSearchOptions; 7 | 8 | public class MockProvider implements ScannerProvider { 9 | public static final String PROVIDER_KEY = "MockProvider"; 10 | 11 | @Override 12 | public void getScanner(Context ctx, ProviderCallback cb, ScannerSearchOptions options) { 13 | cb.onScannerCreated(PROVIDER_KEY, "Mock", new MockScanner()); 14 | cb.onAllScannersCreated(PROVIDER_KEY); 15 | } 16 | 17 | @Override 18 | public String getKey() { 19 | return PROVIDER_KEY; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/bell.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/callbacks/ScannerCommandCallback.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api.callbacks; 2 | 3 | /** 4 | * Callback used to inform of the result of scanner commands, usually optional. 5 | */ 6 | public interface ScannerCommandCallback { 7 | /** 8 | * Called when the command was completed, and if it received a positive answer (when applicable). 9 | */ 10 | void onSuccess(); 11 | 12 | /** 13 | * Called when the command failed, either through or SDK error or negative answer (when applicable). 14 | */ 15 | void onFailure(); 16 | 17 | /** 18 | * Called when the command's expected answer did not arrive in time (usually only with BT scanners). 19 | */ 20 | void onTimeout(); 21 | } 22 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/camera_fill.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/flash_off.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/commands/GetFirmware.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | import com.enioka.scanner.sdk.honeywelloss.spp.data.FirmwareVersion; 5 | 6 | public class GetFirmware implements Command { 7 | @Override 8 | public byte[] getCommand() { 9 | // SYN M CR "REV" "INF" "^" "!" 10 | return new byte[]{22, 77, 13, 82, 69, 86, 73, 78, 70, 94, 33}; 11 | } 12 | 13 | @Override 14 | public Class getReturnType() { 15 | return FirmwareVersion.class; 16 | } 17 | 18 | @Override 19 | public int getTimeOut() { 20 | return 500; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/parsers/BarcodeParser.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.parsers; 2 | 3 | import com.enioka.scanner.data.Barcode; 4 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiSymbologyTranslator; 5 | 6 | import java.nio.charset.StandardCharsets; 7 | 8 | /** 9 | * Responsible for handling 10 | */ 11 | public class BarcodeParser implements PayloadParser { 12 | @Override 13 | public Barcode parseData(final byte[] dataBuffer) { 14 | if (dataBuffer.length < 5) { 15 | return null; 16 | } 17 | byte symbology = dataBuffer[0]; 18 | return new Barcode(new String(dataBuffer, 4, dataBuffer.length - 4, StandardCharsets.US_ASCII), SsiSymbologyTranslator.sdk2Api(symbology)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/lightbulb.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/flashlight_off.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan_generalscan/src/main/java/com/enioka/scanner/sdk/generalscan/commands/BaseCommandNoAck.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.generalscan.commands; 2 | 3 | import com.enioka.scanner.bt.api.Command; 4 | 5 | import java.nio.charset.Charset; 6 | 7 | public class BaseCommandNoAck implements Command { 8 | protected String stringCommand; 9 | 10 | @Override 11 | public byte[] getCommand() { 12 | if (stringCommand != null) { 13 | return (stringCommand /*+ "{G1026}"*/).getBytes(Charset.forName("ASCII")); 14 | } 15 | return new byte[0]; 16 | } 17 | 18 | @Override 19 | public Class getReturnType() { 20 | return null; 21 | } 22 | 23 | @Override 24 | public int getTimeOut() { 25 | return 200; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/proxies/ProviderDiscoveredCallbackProxy.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api.proxies; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | 6 | import com.enioka.scanner.api.callbacks.ProviderDiscoveredCallback; 7 | 8 | public class ProviderDiscoveredCallbackProxy implements ProviderDiscoveredCallback { 9 | protected Handler uiHandler; 10 | protected ProviderDiscoveredCallback wrappedHandler; 11 | 12 | public ProviderDiscoveredCallbackProxy(final ProviderDiscoveredCallback wrappedHandler) { 13 | this.uiHandler = new Handler(Looper.getMainLooper()); 14 | this.wrappedHandler = wrappedHandler; 15 | } 16 | 17 | @Override 18 | public void onDiscoveryDone() { 19 | uiHandler.post(wrappedHandler::onDiscoveryDone); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/camera2.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/api/DataSubscriptionCallback.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.api; 2 | 3 | /** 4 | * A callback which should be called when a command has been fully interpreted. 5 | * 6 | * @param the type of data expected as the result of the command. 7 | */ 8 | public interface DataSubscriptionCallback { 9 | /** 10 | * Called when a data was returned (either after a successful command or at the scanner's initiative). 11 | * 12 | * @param data the data as parsed by the provider. 13 | */ 14 | void onSuccess(T data); 15 | 16 | /** 17 | * Something went wrong with the SDK or the scanner. 18 | */ 19 | void onFailure(); 20 | 21 | /** 22 | * Command was sent, but an expected answer was not received before time out. 23 | */ 24 | void onTimeout(); 25 | } 26 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | source_suffix = { 4 | '.md': 'markdown', 5 | } 6 | source_encoding = 'utf-8' 7 | master_doc = 'index' 8 | 9 | extensions = [ 10 | 'myst_parser', # Markdown support 11 | ] 12 | 13 | myst_enable_extensions = [ 14 | 'colon_fence', # Alternative directive call using :::{directive} ::: 15 | 'strikethrough', # Text strikethrough using ~~text~~ 16 | 'fieldlist', # Better handling of manyfields blocks, useful for API documentation 17 | ] 18 | 19 | myst_heading_anchors = 4 20 | 21 | suppress_warnings = [ 22 | 'myst.strikethrough', # We only generate HTML docs, ignore non-html warnings. 23 | ] 24 | 25 | project = 'enioka Scan' 26 | copyright = '2017-2023, enioka Haute Couture' 27 | #version = '2.4' 28 | #release = '2.4.1' 29 | hightlight_language = 'java' 30 | 31 | html_theme = 'sphinx_rtd_theme' 32 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/LedOn.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.api.ScannerLedColor; 4 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 5 | 6 | public class LedOn extends CommandExpectingAck { 7 | public LedOn(ScannerLedColor color) { 8 | super(SsiCommand.LED_ON.getOpCode(), new byte[]{getColorMask(color)}); 9 | } 10 | 11 | private static byte getColorMask(ScannerLedColor color) { 12 | byte colorMask = 0b00000000; 13 | switch (color) { 14 | case GREEN: 15 | default: 16 | colorMask |= 0b00000001; 17 | break; 18 | case RED: 19 | colorMask |= 0b00000010; 20 | break; 21 | } 22 | return colorMask; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/activities/SnackbarResource.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.activities; 2 | 3 | import androidx.test.espresso.idling.CountingIdlingResource; 4 | 5 | import com.google.android.material.snackbar.Snackbar; 6 | 7 | public class SnackbarResource { 8 | public static CountingIdlingResource countingIdlingResource = new CountingIdlingResource("Snackbar"); 9 | 10 | public static void increment() { 11 | countingIdlingResource.increment(); 12 | } 13 | 14 | public static void decrement() { 15 | countingIdlingResource.decrement(); 16 | } 17 | 18 | public static Snackbar.Callback getSnackbarCallback() { 19 | return new Snackbar.Callback() { 20 | @Override 21 | public void onShown(Snackbar sb) { 22 | decrement(); 23 | } 24 | }; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/open_link.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /enioka_scan_athesi_rd50te/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /enioka_scan_athesi_spa43lte/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/bell_slash.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/test/java/android/util/Log.java: -------------------------------------------------------------------------------- 1 | package android.util; 2 | 3 | public class Log { 4 | public static int d(String tag, String msg) { 5 | System.out.println("DEBUG: " + tag + ": " + msg); 6 | return 0; 7 | } 8 | 9 | public static int i(String tag, String msg) { 10 | System.out.println("INFO: " + tag + ": " + msg); 11 | return 0; 12 | } 13 | 14 | public static int w(String tag, String msg) { 15 | System.out.println("WARN: " + tag + ": " + msg); 16 | return 0; 17 | } 18 | 19 | public static int e(String tag, String msg) { 20 | System.out.println("ERROR: " + tag + ": " + msg); 21 | return 0; 22 | } 23 | 24 | public static int e(String tag, String msg, Throwable e) { 25 | System.out.println("ERROR: " + tag + ": " + msg); 26 | e.printStackTrace(); 27 | return 0; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /npm_integration_frameworks/reactnative/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "rootDir": ".", 4 | "paths": { 5 | "reactnative": ["./src/index"] 6 | }, 7 | "allowUnreachableCode": false, 8 | "allowUnusedLabels": false, 9 | "esModuleInterop": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "jsx": "react-jsx", 12 | "lib": ["ESNext"], 13 | "module": "ESNext", 14 | "moduleResolution": "Bundler", 15 | "noEmit": true, 16 | "noFallthroughCasesInSwitch": true, 17 | "noImplicitReturns": true, 18 | "noImplicitUseStrict": false, 19 | "noStrictGenericChecks": false, 20 | "noUncheckedIndexedAccess": true, 21 | "noUnusedLocals": true, 22 | "noUnusedParameters": true, 23 | "resolveJsonModule": true, 24 | "skipLibCheck": true, 25 | "strict": true, 26 | "target": "ESNext", 27 | "verbatimModuleSyntax": true 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/test/java/android/util/Log.java: -------------------------------------------------------------------------------- 1 | package android.util; 2 | 3 | public class Log { 4 | public static int d(String tag, String msg) { 5 | System.out.println("DEBUG: " + tag + ": " + msg); 6 | return 0; 7 | } 8 | 9 | public static int i(String tag, String msg) { 10 | System.out.println("INFO: " + tag + ": " + msg); 11 | return 0; 12 | } 13 | 14 | public static int w(String tag, String msg) { 15 | System.out.println("WARN: " + tag + ": " + msg); 16 | return 0; 17 | } 18 | 19 | public static int e(String tag, String msg) { 20 | System.out.println("ERROR: " + tag + ": " + msg); 21 | return 0; 22 | } 23 | 24 | public static int e(String tag, String msg, Throwable e) { 25 | System.out.println("ERROR: " + tag + ": " + msg); 26 | e.printStackTrace(); 27 | return 0; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/parsers/CapabilitiesParser.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.parsers; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.data.CapabilitiesReply; 4 | 5 | import java.util.HashSet; 6 | import java.util.Set; 7 | 8 | /** 9 | * CAPABILITIES_REPLY parser. 10 | */ 11 | public class CapabilitiesParser implements PayloadParser { 12 | @Override 13 | public CapabilitiesReply parseData(final byte[] dataBuffer) { 14 | if (dataBuffer.length < 4) { 15 | return null; 16 | } 17 | 18 | boolean supportsMultiPacket = dataBuffer[3] == 1; 19 | 20 | Set res = new HashSet<>(dataBuffer.length - 4); 21 | for (int i = 4; i < dataBuffer.length; i++) { 22 | res.add(dataBuffer[i]); 23 | } 24 | 25 | return new CapabilitiesReply(supportsMultiPacket, res); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/lightbulb_off.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | ## For more details on how to configure your build environment visit 2 | # http://www.gradle.org/docs/current/userguide/build_environment.html 3 | # 4 | # Specifies the JVM arguments used for the daemon process. 5 | # The setting is particularly useful for tweaking memory settings. 6 | # Default value: -Xmx1024m -XX:MaxPermSize=256m 7 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 8 | # 9 | # When configured, Gradle will run in incubating parallel mode. 10 | # This option should only be used with decoupled projects. More details, visit 11 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 12 | # org.gradle.parallel=true 13 | #Wed Sep 13 11:22:30 CEST 2023 14 | org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M" 15 | 16 | # Enable AndroidX 17 | android.useAndroidX=true 18 | android.enableJetifier=true 19 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/proxies/ScannerDataCallbackProxy.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api.proxies; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | 6 | import com.enioka.scanner.api.Scanner; 7 | import com.enioka.scanner.api.callbacks.ScannerDataCallback; 8 | import com.enioka.scanner.data.Barcode; 9 | 10 | import java.util.List; 11 | 12 | public class ScannerDataCallbackProxy implements ScannerDataCallback { 13 | protected Handler uiHandler; 14 | protected ScannerDataCallback wrappedHandler; 15 | 16 | public ScannerDataCallbackProxy(final ScannerDataCallback wrappedHandler) { 17 | this.uiHandler = new Handler(Looper.getMainLooper()); 18 | this.wrappedHandler = wrappedHandler; 19 | } 20 | 21 | @Override 22 | public void onData(final Scanner s, final List data) { 23 | uiHandler.post(() -> wrappedHandler.onData(s, data)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/parsers/HoneywellOssDataTranslator.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.parsers; 2 | 3 | import com.enioka.scanner.data.BarcodeType; 4 | import com.enioka.scanner.sdk.honeywelloss.spp.SymbologyId; 5 | 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | 9 | public class HoneywellOssDataTranslator { 10 | private final static Map sdk2Api = new HashMap<>(); 11 | 12 | static { 13 | for (Integer key: SymbologyId.honeywellIdMap.keySet()) { 14 | sdk2Api.put(key.byteValue(), SymbologyId.toBarcodeType(SymbologyId.honeywellIdMap.get(key))); 15 | } 16 | } 17 | 18 | public static BarcodeType sdk2Api(Byte symbology) { 19 | BarcodeType res = sdk2Api.get(symbology); 20 | if (res == null) { 21 | return BarcodeType.UNKNOWN; 22 | } 23 | return res; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /enioka_scan_zebra_dw/src/main/java/com/enioka/scanner/sdk/zebra/dw/ZebraDwProvider.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebra.dw; 2 | 3 | import android.content.Context; 4 | 5 | import com.enioka.scanner.api.Scanner; 6 | import com.enioka.scanner.api.ScannerSearchOptions; 7 | import com.enioka.scanner.helpers.intent.IntentScannerProvider; 8 | 9 | /** 10 | * Provider for Zebra devices using the DataWedge service. 11 | */ 12 | public class ZebraDwProvider extends IntentScannerProvider { 13 | public static final String PROVIDER_KEY = "ZebraDwProvider"; 14 | 15 | @Override 16 | protected void configureProvider() { 17 | appPackageToTest = "com.symbol.datawedge"; 18 | } 19 | 20 | @Override 21 | public String getKey() { 22 | return PROVIDER_KEY; 23 | } 24 | 25 | @Override 26 | protected Scanner createNewScanner(Context ctx, ScannerSearchOptions options) { 27 | return new ZebraDwScanner(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /docs/api/index.md: -------------------------------------------------------------------------------- 1 | # API reference 2 | 3 | % Notes: 4 | 5 | % Due to the limitations of Sphinx and MyST, documentation formatting was 'hacked' a bit by using 6 | % python and cpp directives as Java is not natively supported and has no proper third-party option. 7 | 8 | % API guides for the BluetoothScanner API may be helpful for provider developers but is not a 9 | % priority. A full bluetooth guide may be needed, as well as a detailed overview of the library's 10 | % workflow from service startup to scanner availability. 11 | 12 | This section contains more in-depth info about important classes and interfaces of **enioka Scan**. 13 | 14 | :::{toctree} 15 | :caption: For most users 16 | :maxdepth: 2 17 | 18 | scanner 19 | scanner_service 20 | scanner_callbacks 21 | scanner_activity 22 | camera 23 | others 24 | ::: 25 | 26 | :::{toctree} 27 | :caption: For advanced users and enioka Scan developpers 28 | :maxdepth: 2 29 | 30 | lazerscanner 31 | scanner_provider 32 | ::: -------------------------------------------------------------------------------- /enioka_scan_honeywell/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/proxies/ScannerStatusCallbackProxy.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api.proxies; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | import androidx.annotation.Nullable; 6 | 7 | import com.enioka.scanner.api.Scanner; 8 | import com.enioka.scanner.api.callbacks.ScannerStatusCallback; 9 | 10 | public class ScannerStatusCallbackProxy implements ScannerStatusCallback { 11 | protected final Handler uiHandler; 12 | protected final ScannerStatusCallback wrappedHandler; 13 | 14 | public ScannerStatusCallbackProxy(final ScannerStatusCallback wrappedHandler) { 15 | this.uiHandler = new Handler(Looper.getMainLooper()); 16 | this.wrappedHandler = wrappedHandler; 17 | } 18 | 19 | @Override 20 | public void onStatusChanged(@Nullable final Scanner scanner, final Status newStatus) { 21 | uiHandler.post(() -> wrappedHandler.onStatusChanged(scanner, newStatus)); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /enioka_scan_zebra_dw/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /npm_integration_frameworks/cordova-capacitor/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | ActivityStarterPlugin 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /enioka_scan_bluebird/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/proxies/ScannerCommandCallbackProxy.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api.proxies; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | 6 | import com.enioka.scanner.api.callbacks.ScannerCommandCallback; 7 | 8 | public class ScannerCommandCallbackProxy implements ScannerCommandCallback { 9 | protected Handler uiHandler; 10 | protected ScannerCommandCallback wrappedHandler; 11 | 12 | public ScannerCommandCallbackProxy(ScannerCommandCallback wrappedHandler) { 13 | this.uiHandler = new Handler(Looper.getMainLooper()); 14 | this.wrappedHandler = wrappedHandler; 15 | } 16 | 17 | @Override 18 | public void onSuccess() { 19 | uiHandler.post(wrappedHandler::onSuccess); 20 | } 21 | 22 | @Override 23 | public void onFailure() { 24 | uiHandler.post(wrappedHandler::onFailure); 25 | } 26 | 27 | @Override 28 | public void onTimeout() { 29 | uiHandler.post(wrappedHandler::onTimeout); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/proxies/ScannerInitCallbackProxy.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api.proxies; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | 6 | import com.enioka.scanner.api.Scanner; 7 | import com.enioka.scanner.api.callbacks.ScannerInitCallback; 8 | 9 | public class ScannerInitCallbackProxy implements ScannerInitCallback { 10 | protected final Handler uiHandler; 11 | protected final ScannerInitCallback wrappedHandler; 12 | 13 | public ScannerInitCallbackProxy(ScannerInitCallback wrappedHandler) { 14 | this.uiHandler = new Handler(Looper.getMainLooper()); 15 | this.wrappedHandler = wrappedHandler; 16 | } 17 | 18 | @Override 19 | public void onConnectionSuccessful(final Scanner s) { 20 | uiHandler.post(() -> wrappedHandler.onConnectionSuccessful(s)); 21 | } 22 | 23 | @Override 24 | public void onConnectionFailure(final Scanner s) { 25 | uiHandler.post(() -> wrappedHandler.onConnectionFailure(s)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/data/Barcode.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.data; 2 | 3 | /** 4 | * The result of a barcode scan. 5 | */ 6 | public class Barcode { 7 | private String barcode; 8 | /** 9 | * rawBarcode without trim, useful for 2D barcode who can have a structure based on some white space. 10 | */ 11 | private String rawBarcode; 12 | private BarcodeType barcodeType = BarcodeType.UNKNOWN; 13 | 14 | public Barcode(String barcode, BarcodeType barcodeType) { 15 | this.rawBarcode = barcode; 16 | 17 | this.barcode = barcode.trim(); 18 | this.barcodeType = barcodeType; 19 | } 20 | 21 | public String getBarcode() { 22 | return barcode; 23 | } 24 | 25 | public BarcodeType getBarcodeType() { 26 | return barcodeType; 27 | } 28 | 29 | public String getRawBarcode() {return rawBarcode;} 30 | 31 | @Override 32 | public String toString() { 33 | return this.barcode + " (" + this.barcodeType.code + ")"; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /enioka_scan_postech/src/main/java/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /enioka_scan/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/Paulin/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /enioka_scan_athesi_spa43lte/src/main/java/com/enioka/scanner/sdk/athesi/SPA43LTE/AthesiSPA43LTEProvider.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.athesi.SPA43LTE; 2 | 3 | import android.content.Context; 4 | 5 | import com.enioka.scanner.api.Scanner; 6 | import com.enioka.scanner.api.ScannerSearchOptions; 7 | import com.enioka.scanner.helpers.intent.IntentScannerProvider; 8 | 9 | /** 10 | * Provider for the HHT Wrapper Layer, supports old Athesi SPA43 type integrated scanners (only tested with the SPA43 LTE). 11 | */ 12 | public class AthesiSPA43LTEProvider extends IntentScannerProvider { 13 | public static final String PROVIDER_KEY = "AthesiHHTProvider"; 14 | 15 | @Override 16 | protected void configureProvider() { 17 | specificDevices.add("SPA43LTE"); 18 | } 19 | 20 | @Override 21 | public String getKey() { 22 | return PROVIDER_KEY; 23 | } 24 | 25 | @Override 26 | protected Scanner createNewScanner(Context ctx, ScannerSearchOptions options) { 27 | return new AthesiSPA43LTEScanner(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /enioka_scan_m3/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/Paulin/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /enioka_scan_mock/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/Paulin/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /enioka_scan_zebra/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/Paulin/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/ssi/SsiStatus.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.ssi; 2 | 3 | /** 4 | * Helper class for the status-byte of an SSI packet. 5 | * These values are purely deduced from observations and do not match the 2015 documentation. 6 | */ 7 | public enum SsiStatus { 8 | /** Default value, the scanner does not seem to care about status so it may be suitable for all commands. */ 9 | DEFAULT((byte) 0x00), 10 | /** Value present in all messages in direct response to a previous message in the opposite direction. */ 11 | RESPONSE((byte) 0x80), 12 | /** Value present in all mono-packet DECODE_DATA messages. */ 13 | NOTIFICATION((byte) 0x20), 14 | /** Value present as the third byte in every first packet of a multi-packet DECODE_DATA message. */ 15 | MULTIPACKET_FIRST((byte) 0x02); 16 | 17 | private final byte id; 18 | 19 | SsiStatus(final byte id) { 20 | this.id = id; 21 | } 22 | 23 | public byte getByte() { 24 | return id; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/github.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan_honeywell/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/Paulin/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /enioka_scan_koamtac/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/Paulin/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /enioka_scan_bluebird/src/main/java/com/enioka/scanner/sdk/bluebird/BluebirdProvider.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.bluebird; 2 | 3 | import android.content.Context; 4 | 5 | import com.enioka.scanner.api.Scanner; 6 | import com.enioka.scanner.api.ScannerSearchOptions; 7 | import com.enioka.scanner.helpers.intent.IntentScannerProvider; 8 | 9 | /** 10 | * Provider for Bluebird integrated scanners through an intent service. 11 | */ 12 | public class BluebirdProvider extends IntentScannerProvider { 13 | public static final String PROVIDER_KEY = "BluebirdProvider"; 14 | 15 | @Override 16 | protected void configureProvider() { 17 | intentToTest = "kr.co.bluebird.android.bbapi.action.BARCODE_OPEN"; 18 | //appPackageToTest = "kr.co.bluebird.android.bbsettings"; 19 | } 20 | 21 | @Override 22 | public String getKey() { 23 | return PROVIDER_KEY; 24 | } 25 | 26 | @Override 27 | protected Scanner createNewScanner(Context ctx, ScannerSearchOptions options) { 28 | return new BluebirdScanner(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /enioka_scan_proglove/src/main/java/com/enioka/scanner/sdk/proglove/ProgloveProvider.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.proglove; 2 | 3 | import android.content.Context; 4 | 5 | import com.enioka.scanner.api.Scanner; 6 | import com.enioka.scanner.api.ScannerSearchOptions; 7 | import com.enioka.scanner.helpers.intent.IntentScannerProvider; 8 | 9 | /** 10 | * Provider for Proglove integrated scanners through an intent service. 11 | */ 12 | public class ProgloveProvider extends IntentScannerProvider { 13 | public static final String PROVIDER_KEY = "ProgloveProvider"; 14 | 15 | @Override 16 | protected void configureProvider() { 17 | appPackageToTest = "de.proglove.connect"; 18 | //serviceToTest = "de.proglove.connect/de.proglove.core.services.ProGloveService"; 19 | } 20 | 21 | @Override 22 | public String getKey() { 23 | return PROVIDER_KEY; 24 | } 25 | 26 | @Override 27 | protected Scanner createNewScanner(Context ctx, ScannerSearchOptions options) { 28 | return new ProgloveScanner(options); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_integrated/src/main/java/com/enioka/scanner/sdk/honeywelloss/integrated/HoneywellOssIntegratedScannerProvider.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.integrated; 2 | 3 | import android.content.Context; 4 | 5 | import com.enioka.scanner.api.Scanner; 6 | import com.enioka.scanner.api.ScannerSearchOptions; 7 | import com.enioka.scanner.helpers.intent.IntentScannerProvider; 8 | 9 | /** 10 | * Provider for the Honeywell EDA52 Integrated Scanner 11 | */ 12 | public class HoneywellOssIntegratedScannerProvider extends IntentScannerProvider { 13 | public static final String PROVIDER_KEY = "HoneywellOssIntegratedProvider"; 14 | 15 | @Override 16 | public void configureProvider() { 17 | intentToTest = "com.honeywell.decode.DecodeService"; 18 | } 19 | 20 | @Override 21 | public String getKey() { 22 | return PROVIDER_KEY; 23 | } 24 | 25 | @Override 26 | protected Scanner createNewScanner(Context ctx, ScannerSearchOptions options) { 27 | return new HoneywellOssIntegratedScanner(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/bug.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/drawable/upc_scan.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /enioka_scan_athesi_rd50te/src/main/java/com/enioka/scanner/sdk/athesi/RD50TE/AthesiRD50TEProvider.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.athesi.RD50TE; 2 | 3 | import android.content.Context; 4 | 5 | import com.enioka.scanner.api.Scanner; 6 | import com.enioka.scanner.api.ScannerSearchOptions; 7 | import com.enioka.scanner.helpers.intent.IntentScannerProvider; 8 | 9 | /** 10 | * Provider for Athesi E5L scanners. 11 | * May use similar intents as other modern Athesi scanners but only the E5L is accepted as it is the only one that could be tested. 12 | */ 13 | public class AthesiRD50TEProvider extends IntentScannerProvider { 14 | public static final String PROVIDER_KEY = "AthesiE5LProvider"; 15 | 16 | @Override 17 | protected void configureProvider() { 18 | specificDevices.add("RD50TE"); 19 | } 20 | 21 | @Override 22 | public String getKey() { 23 | return PROVIDER_KEY; 24 | } 25 | 26 | @Override 27 | protected Scanner createNewScanner(Context ctx, ScannerSearchOptions options) { 28 | return new AthesiRD50TEScanner(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/upc_scan.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/gear_fill.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /demoscannerapp/src/androidTest/java/com/enioka/scanner/demo/ViewVisibleIdlingResource.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.demo; 2 | 3 | import android.view.View; 4 | 5 | import androidx.test.espresso.IdlingResource; 6 | 7 | public class ViewVisibleIdlingResource implements IdlingResource { 8 | private final View view; 9 | private ResourceCallback callback; 10 | 11 | public ViewVisibleIdlingResource(View view) { 12 | this.view = view; 13 | } 14 | 15 | @Override 16 | public String getName() { 17 | return "Waiting for view " + view.getId() + " to be visible"; 18 | } 19 | 20 | @Override 21 | public boolean isIdleNow() { 22 | // Check if this view is displayed 23 | boolean viewDisplayed = this.view.getVisibility() == View.VISIBLE; 24 | 25 | if (viewDisplayed && callback != null) { 26 | callback.onTransitionToIdle(); 27 | } 28 | 29 | return viewDisplayed; 30 | } 31 | 32 | @Override 33 | public void registerIdleTransitionCallback(ResourceCallback callback) { 34 | this.callback = callback; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /enioka_scan_m3/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /demoscannerapp/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\marsu\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | 27 | -keep class net.sourceforge.zbar.** { 28 | *; 29 | } 30 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/manager/common/SerialBtScannerPassiveConnectionManager.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.manager.common; 2 | 3 | import android.bluetooth.BluetoothAdapter; 4 | 5 | /** 6 | * Some scanners connect as masters onto the slave Android device. 7 | * This means the Android device must have an open listener. 8 | * This interface provides callback for providers to influence this listener lifecycle. 9 | */ 10 | public interface SerialBtScannerPassiveConnectionManager { 11 | /** 12 | * Signals the provider that all passive connection listeners must be restarted. Used to allow reconnection of a master device in case of accidental disconnection. 13 | * 14 | * @param bluetoothAdapter 15 | */ 16 | void resetListener(BluetoothAdapter bluetoothAdapter); 17 | 18 | /** 19 | * Signal the provider that it is no longer necessary to keep passive connection listeners open. 20 | * This is called when a master device has successfully connected - in this case the BT listener should be closed as it is a battery hog. 21 | */ 22 | void stopMasterListener(); 23 | } 24 | -------------------------------------------------------------------------------- /enioka_scan_generalscan/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /NOTICE.md: -------------------------------------------------------------------------------- 1 | Enioka Haute Couture Android Barcode Scanning Library 2 | Copyright 2017-2019 Enioka Haute Couture 3 | 4 | All items in this repository are licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use anything from this repository except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | 17 | 18 | Image barcode scanning is provided by the ZBar library package, which is open source software under a LGPL2.1 license by Spadix. 19 | Original code can be found at http://zbar.sourceforge.net 20 | 21 | Image barcode scanning is provided by the ZXing library package, which is open source software under an Apache2 license by the ZXing Project. 22 | Original code can be found at https://github.com/zxing/zxing 23 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_integrated/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | [':enioka_scan', 2 | ':enioka_scan_camera', 3 | 'enioka_scan_mock', 4 | 'enioka_scan_zebra_dw', 5 | 'enioka_scan_athesi_spa43lte', 6 | 'enioka_scan_athesi_rd50te', 7 | ':enioka_scan_bluebird', 8 | ':enioka_scan_generalscan', 9 | ':enioka_scan_honeywelloss_spp', 10 | ':enioka_scan_honeywelloss_integrated', 11 | ':enioka_scan_zebraoss', 12 | ':enioka_scan_postech', 13 | ':enioka_scan_proglove', 14 | ':demoscannerapp'].each({ include it }) 15 | 16 | // Projects with either local libs or inside a private Maven repository 17 | gradle.ext.gpr = ext.find('gpr.user') ?: System.getenv("GH_DRIVER_REPOSITORY_USERNAME") 18 | ["Zebra", "Honeywell", "Koamtac", "M3", "Proglove"].each { sdkName -> 19 | def propertyName = "with" + sdkName 20 | def subprojectName = "enioka_scan_" + sdkName.toLowerCase() 21 | 22 | def path = subprojectName + "/libs" 23 | def files = file(path).list() 24 | if (files.any { it.endsWith(".jar") || it.endsWith(".aar") } || gradle.ext.gpr != null) { 25 | gradle.ext.setProperty(propertyName, true) 26 | include ":" + subprojectName 27 | } else { 28 | gradle.ext.setProperty(propertyName, false) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 15 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/Nack.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.bt.api.MessageRejectionReason; 4 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 5 | 6 | /** 7 | * A message or segment explicit NON acknowledgment. 8 | */ 9 | public class Nack extends CommandExpectingNothing { 10 | public Nack(MessageRejectionReason reason) { 11 | super(SsiCommand.CMD_NACK.getOpCode(), getReasonCode(reason)); 12 | } 13 | 14 | private static byte[] getReasonCode(MessageRejectionReason reason) { 15 | byte reasonCode; 16 | switch (reason) { 17 | case CANNOT_PARSE: 18 | case INVALID_OPERATION: 19 | case INVALID_PARAMETER: 20 | reasonCode = 0x2; 21 | break; 22 | case CHECKSUM_FAILURE: 23 | reasonCode = 0x1; 24 | break; 25 | case UNDESIRED_MESSAGE: 26 | reasonCode = 0x10; 27 | break; 28 | default: 29 | reasonCode = 0x2; 30 | } 31 | 32 | return new byte[]{reasonCode}; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /enioka_scan_koamtac/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/manager/common/DataSubscription.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.manager.common; 2 | 3 | import com.enioka.scanner.bt.api.DataSubscriptionCallback; 4 | 5 | import java.util.Calendar; 6 | 7 | /** 8 | * Helper class storing execution context for callbacks on parsed data. 9 | */ 10 | public class DataSubscription { 11 | private final DataSubscriptionCallback callback; 12 | private Calendar timeOut = null; 13 | private final boolean permanent; 14 | 15 | public DataSubscription(DataSubscriptionCallback callback, int timeOutMs, boolean permanent) { 16 | this.callback = callback; 17 | this.permanent = permanent; 18 | 19 | if (timeOutMs > 0) { 20 | timeOut = Calendar.getInstance(); 21 | timeOut.add(Calendar.MILLISECOND, timeOutMs); 22 | } 23 | } 24 | 25 | public boolean isTimedOut() { 26 | return this.timeOut != null && this.timeOut.before(Calendar.getInstance()); 27 | } 28 | 29 | public DataSubscriptionCallback getCallback() { 30 | return callback; 31 | } 32 | 33 | public boolean isPermanent() { 34 | return this.permanent; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /enioka_scan_mock/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdk 34 5 | defaultConfig { 6 | minSdkVersion 19 7 | targetSdkVersion 28 8 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 9 | multiDexEnabled true 10 | } 11 | buildTypes { 12 | release { 13 | minifyEnabled false 14 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 15 | } 16 | } 17 | lint { 18 | disable 'ExpiredTargetSdkVersion' 19 | } 20 | namespace 'com.enioka.scanner.sdk.mock' 21 | } 22 | 23 | allprojects { 24 | repositories { 25 | google() 26 | mavenCentral() 27 | } 28 | } 29 | 30 | dependencies { 31 | implementation project(':enioka_scan') 32 | 33 | // Linter helpers 34 | implementation 'com.android.support:support-annotations:28.0.0' 35 | 36 | // Test things (useless for now) 37 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 38 | exclude group: 'com.android.support', module: 'support-annotations' 39 | }) 40 | testImplementation 'junit:junit:4.12' 41 | } 42 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/service/ScannerClient.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.service; 2 | 3 | import com.enioka.scanner.api.callbacks.ScannerStatusCallback; 4 | import com.enioka.scanner.data.Barcode; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Interface describing a client of the Scanner Service API. 10 | */ 11 | public interface ScannerClient extends ScannerStatusCallback { 12 | /** 13 | * Callback used once the initialization of scanners is over. 14 | * This method is retroactively called on new clients if at least one scanner initialization happened. 15 | * @param count The amount of initialized scanners. 16 | */ 17 | void onScannerInitEnded(int count); 18 | 19 | /** 20 | * Callback used once the discovery of providers is over, which also implies that the scanner service is ready to be used. 21 | * This method is retroactively called on new clients if at least one provider discovery happened. 22 | */ 23 | void onProviderDiscoveryEnded(); 24 | 25 | /** 26 | * Callback used when a scanner successfully reads data. 27 | * @param data The barcodes read by the scanner. 28 | */ 29 | void onData(List data); 30 | } 31 | -------------------------------------------------------------------------------- /demoscannerapp/src/main/res/drawable/baseline_settings_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/parsers/ErrorParser.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.parsers; 2 | 3 | import android.util.Log; 4 | 5 | import com.enioka.scanner.bt.api.MessageRejectionReason; 6 | 7 | /** 8 | * Responsible for handling NAK data 9 | */ 10 | public class ErrorParser implements PayloadParser { 11 | private static final String LOG_TAG = "ErrorParser"; 12 | 13 | @Override 14 | public MessageRejectionReason parseData(final byte[] dataBuffer) { 15 | if (dataBuffer.length < 1) { 16 | return null; 17 | } 18 | 19 | switch (dataBuffer[0]) { 20 | case 1: 21 | return MessageRejectionReason.CHECKSUM_FAILURE; 22 | case 2: 23 | return MessageRejectionReason.INVALID_OPERATION; 24 | case 6: 25 | return MessageRejectionReason.DENIED; 26 | case 10: 27 | return MessageRejectionReason.UNDESIRED_MESSAGE; 28 | default: 29 | Log.w(LOG_TAG, "Cannot determine SDK cause for SSI cause " + dataBuffer[0]); 30 | return MessageRejectionReason.UNKNOWN; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /demoscannerapp/playstore/full_description.txt: -------------------------------------------------------------------------------- 1 | This application is a demo for enioka Scan, a library that makes the integration of all barcode scanners easy in any Android application, avoiding vendor lock-in and lowering the cost of advanced scanner integration. 2 | 3 | It is compatible with a wide variety of scanning devices, integrated or external, from different vendors such as Zebra, Honeywell, Athesi and more. 4 | 5 | When there are no compatible hardware devices available, the library provides a camera reader based on ZBar (default) or ZXing. 6 | 7 | Through a common abstraction, it provides access to the following methods (provided the hardware supports them): 8 | 9 | - press/release the scanner's trigger 10 | - pause/resume scanning abilities 11 | - disconnect/reconnect scanners 12 | - enable/disable illumination from the scanner 13 | - enable/disable colored LEDs 14 | - set scanner enabled symbologies 15 | 16 | Finally, it provides a ready to use Service that handles scanner lifecycles, as well as a template Activity, allowing you to use scanners in a matter of minutes. 17 | 18 | This app includes all of the library's compatibility modules. 19 | 20 | Check out the library and its source code on GitHub: https://github.com/enioka-Haute-Couture/enioka_scan -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/activities/ManualLogDialog.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.activities; 2 | 3 | import android.content.Context; 4 | import android.graphics.PorterDuff; 5 | import android.graphics.PorterDuffColorFilter; 6 | import android.graphics.drawable.Drawable; 7 | 8 | import androidx.core.content.ContextCompat; 9 | 10 | import com.enioka.scanner.R; 11 | import com.google.android.material.dialog.MaterialAlertDialogBuilder; 12 | 13 | public class ManualLogDialog { 14 | static void launchDialog(Context context, String title, String logs, String textButton) { 15 | Drawable icon = ContextCompat.getDrawable(context, R.drawable.info); 16 | 17 | if (icon != null) { 18 | // set color of icon to black api 18 19 | icon.setColorFilter(new PorterDuffColorFilter(ContextCompat.getColor(context, com.google.android.material.R.color.design_default_color_primary), PorterDuff.Mode.SRC_IN)); 20 | } 21 | 22 | new MaterialAlertDialogBuilder(context) 23 | .setTitle(title) 24 | .setIcon(icon) 25 | .setMessage(logs) 26 | .setNegativeButton(textButton, (dialog, which) -> dialog.dismiss()) 27 | .show(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/api/BtSppScannerProvider.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.api; 2 | 3 | import com.enioka.scanner.api.Scanner; 4 | 5 | /** 6 | * A specialized form of {@link com.enioka.scanner.api.ScannerProvider} for Bluetooth Serial Port Profile scanners.
7 | * Implementations are all thread-safe. 8 | */ 9 | public interface BtSppScannerProvider { 10 | /** 11 | * Tests whether a scanner is compatible with the provider. Must return under 50ms. 12 | * 13 | * @param device a connected device, ready to run commands. 14 | * @return true if compatible. 15 | */ 16 | void canManageDevice(BluetoothScanner device, ManagementCallback callback); 17 | 18 | /** 19 | * The unique key which identifies this provider. 20 | * 21 | * @return the key 22 | */ 23 | String getKey(); 24 | 25 | /** 26 | * The {@link ScannerDataParser} which should be used to parse results. 27 | */ 28 | ScannerDataParser getInputHandler(); 29 | 30 | /** 31 | * A way to signal that this provider can or cannot manage a device. 32 | */ 33 | interface ManagementCallback { 34 | void canManage(Scanner libraryScanner); 35 | 36 | void cannotManage(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /enioka_scan_zebra_dw/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | 3 | description 'Scanner provider for Zebra devices using the Zebra DataWedge service' 4 | 5 | android { 6 | compileSdk 34 7 | defaultConfig { 8 | minSdkVersion 19 9 | targetSdkVersion 28 10 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 11 | multiDexEnabled true 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | lint { 20 | disable 'ExpiredTargetSdkVersion' 21 | } 22 | namespace 'com.enioka.scanner.sdk.zebra.dw' 23 | } 24 | 25 | ext { 26 | mavenArtifactId = "provider-os-zebra-dw" 27 | } 28 | 29 | 30 | dependencies { 31 | // We need the APIs 32 | implementation project(':enioka_scan') 33 | 34 | // Linter helpers 35 | implementation 'com.android.support:support-annotations:28.0.0' 36 | 37 | // Test things (useless for now) 38 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 39 | exclude group: 'com.android.support', module: 'support-annotations' 40 | }) 41 | testImplementation 'junit:junit:4.13.2' 42 | } 43 | -------------------------------------------------------------------------------- /enioka_scan_bluebird/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | apply plugin: 'com.android.library' 3 | 4 | description 'Scanner provider for bluebird devices.' 5 | 6 | android { 7 | compileSdk 34 8 | defaultConfig { 9 | minSdkVersion 19 10 | targetSdkVersion 28 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | multiDexEnabled true 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'roguard-rules.pro' 18 | } 19 | } 20 | lint { 21 | disable 'ExpiredTargetSdkVersion' 22 | } 23 | namespace 'com.enioka.scanner.sdk.bluebird' 24 | } 25 | 26 | ext { 27 | mavenArtifactId = "provider-os-bluebird" 28 | } 29 | 30 | 31 | dependencies { 32 | // We need the APIs 33 | implementation project(':enioka_scan') 34 | 35 | // Linter helpers 36 | implementation 'com.android.support:support-annotations:28.0.0' 37 | 38 | // Test things (useless for now) 39 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 40 | exclude group: 'com.android.support', module: 'support-annotations' 41 | }) 42 | testImplementation 'junit:junit:4.13.2' 43 | } 44 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | 3 | description 'Scanner provider for Zebra BT low-energy / classic devices' 4 | 5 | android { 6 | compileSdk 34 7 | defaultConfig { 8 | minSdkVersion 19 9 | targetSdkVersion 28 10 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 11 | multiDexEnabled true 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'roguard-rules.pro' 17 | } 18 | } 19 | lint { 20 | disable 'ExpiredTargetSdkVersion' 21 | abortOnError false 22 | } 23 | namespace 'com.enioka.scanner.sdk.zebraoss' 24 | } 25 | 26 | ext { 27 | mavenArtifactId = "provider-os-zebra-bt" 28 | } 29 | 30 | 31 | dependencies { 32 | // We need the APIs 33 | implementation project(':enioka_scan') 34 | 35 | // Linter helpers 36 | implementation 'androidx.appcompat:appcompat:1.6.1' 37 | 38 | // Test things (useless for now) 39 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 40 | exclude group: 'com.android.support', module: 'support-annotations' 41 | }) 42 | testImplementation 'junit:junit:4.13.2' 43 | } 44 | -------------------------------------------------------------------------------- /enioka_scan_proglove/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | apply plugin: 'com.android.library' 3 | 4 | description 'Scanner provider for Proglove BT low energy devices' 5 | 6 | android { 7 | compileSdk 34 8 | defaultConfig { 9 | minSdkVersion 19 10 | targetSdkVersion 28 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | multiDexEnabled true 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'roguard-rules.pro' 18 | } 19 | } 20 | lint { 21 | disable 'ExpiredTargetSdkVersion' 22 | } 23 | namespace 'com.enioka.scanner.sdk.proglove' 24 | } 25 | 26 | ext { 27 | mavenArtifactId = "provider-cs-proglove" 28 | } 29 | 30 | 31 | dependencies { 32 | // We need the APIs 33 | implementation project(':enioka_scan') 34 | 35 | // Linter helpers 36 | implementation 'com.android.support:support-annotations:28.0.0' 37 | 38 | // Test things (useless for now) 39 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 40 | exclude group: 'com.android.support', module: 'support-annotations' 41 | }) 42 | testImplementation 'junit:junit:4.13.2' 43 | } 44 | -------------------------------------------------------------------------------- /enioka_scan_generalscan/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | apply plugin: 'com.android.library' 3 | 4 | description 'Scanner provider for GeneralScan devices.' 5 | 6 | android { 7 | compileSdk 34 8 | defaultConfig { 9 | minSdkVersion 19 10 | targetSdkVersion 28 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | multiDexEnabled true 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'roguard-rules.pro' 18 | } 19 | } 20 | lint { 21 | disable 'ExpiredTargetSdkVersion' 22 | } 23 | namespace 'com.enioka.scanner.sdk.generalscan' 24 | } 25 | 26 | ext { 27 | mavenArtifactId = "provider-os-generalscan-bt" 28 | } 29 | 30 | 31 | dependencies { 32 | // We need the APIs 33 | implementation project(':enioka_scan') 34 | 35 | // Linter helpers 36 | implementation 'com.android.support:support-annotations:28.0.0' 37 | 38 | // Test things (useless for now) 39 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 40 | exclude group: 'com.android.support', module: 'support-annotations' 41 | }) 42 | testImplementation 'junit:junit:4.13.2' 43 | } 44 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/RequestRevision.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.bt.api.BluetoothScanner; 4 | import com.enioka.scanner.bt.api.Command; 5 | import com.enioka.scanner.sdk.zebraoss.data.ReplyRevision; 6 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 7 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiMonoPacketWrapper; 8 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiStatus; 9 | 10 | public class RequestRevision implements Command { 11 | private final SsiMonoPacketWrapper packet; 12 | 13 | public RequestRevision() { 14 | packet = new SsiMonoPacketWrapper(SsiCommand.REQUEST_REVISION.getOpCode(), SsiStatus.DEFAULT.getByte(), new byte[0]); 15 | } 16 | 17 | @Override 18 | public byte[] getCommand() { 19 | return packet.toCommandBuffer(false); 20 | } 21 | 22 | @Override 23 | public byte[] getCommand(final BluetoothScanner bluetoothScanner) { 24 | return packet.toCommandBuffer(bluetoothScanner.isBleDevice()); 25 | } 26 | 27 | @Override 28 | public Class getReturnType() { 29 | return ReplyRevision.class; 30 | } 31 | 32 | @Override 33 | public int getTimeOut() { 34 | return 1000; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/layout/dropdown_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 19 | 20 | 27 | 28 | 33 | 34 | -------------------------------------------------------------------------------- /enioka_scan_athesi_spa43lte/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | apply plugin: 'com.android.library' 3 | 4 | description 'Scanner provider for Athesi SPA43 device (SPA43LTE name).' 5 | 6 | android { 7 | compileSdk 34 8 | defaultConfig { 9 | minSdkVersion 19 10 | targetSdkVersion 28 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | multiDexEnabled true 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'roguard-rules.pro' 18 | } 19 | } 20 | lint { 21 | disable 'ExpiredTargetSdkVersion' 22 | } 23 | namespace 'com.enioka.scanner.sdk.athesi.SPA43LTE' 24 | } 25 | 26 | ext { 27 | mavenArtifactId = "provider-os-athesi-spa43" 28 | } 29 | 30 | 31 | dependencies { 32 | // We need the APIs 33 | implementation project(':enioka_scan') 34 | 35 | // Linter helpers 36 | implementation 'com.android.support:support-annotations:28.0.0' 37 | 38 | // Test things (useless for now) 39 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 40 | exclude group: 'com.android.support', module: 'support-annotations' 41 | }) 42 | testImplementation 'junit:junit:4.13.2' 43 | } 44 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/CommandExpectingAck.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.bt.api.BluetoothScanner; 4 | import com.enioka.scanner.bt.api.Command; 5 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiMonoPacketWrapper; 6 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiStatus; 7 | 8 | public abstract class CommandExpectingAck implements Command { 9 | private final SsiMonoPacketWrapper packet; 10 | 11 | public CommandExpectingAck(byte opCode, byte[] data) { 12 | packet = new SsiMonoPacketWrapper(opCode, SsiStatus.DEFAULT.getByte(), data); 13 | } 14 | 15 | public CommandExpectingAck(byte opCode) { 16 | packet = new SsiMonoPacketWrapper(opCode, SsiStatus.DEFAULT.getByte(), new byte[0]); 17 | } 18 | 19 | @Override 20 | public byte[] getCommand() { 21 | return packet.toCommandBuffer(false); 22 | } 23 | 24 | @Override 25 | public byte[] getCommand(final BluetoothScanner bluetoothScanner) { 26 | return packet.toCommandBuffer(bluetoothScanner.isBleDevice()); 27 | } 28 | 29 | @Override 30 | public Class getReturnType() { 31 | return Ack.class; 32 | } 33 | 34 | @Override 35 | public int getTimeOut() { 36 | return 1000; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /enioka_scan_athesi_rd50te/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | apply plugin: 'com.android.library' 3 | 4 | description 'Athesi E5L scanner provider for the Athesi E5L device (RD50TE name).' 5 | 6 | android { 7 | compileSdk 34 8 | defaultConfig { 9 | minSdkVersion 19 10 | targetSdkVersion 28 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | multiDexEnabled true 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'roguard-rules.pro' 18 | } 19 | } 20 | lint { 21 | disable 'ExpiredTargetSdkVersion' 22 | } 23 | namespace 'com.enioka.scanner.sdk.athesi.RD50TE' 24 | } 25 | 26 | ext { 27 | mavenArtifactId = "provider-os-athesi-e5l" 28 | } 29 | 30 | 31 | dependencies { 32 | // We need the APIs 33 | implementation project(':enioka_scan') 34 | 35 | // Linter helpers 36 | implementation 'com.android.support:support-annotations:28.0.0' 37 | 38 | // Test things (useless for now) 39 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 40 | exclude group: 'com.android.support', module: 'support-annotations' 41 | }) 42 | testImplementation 'junit:junit:4.13.2' 43 | } 44 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/helpers/ScannerProviderHolder.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.helpers; 2 | 3 | import androidx.annotation.NonNull; 4 | 5 | import com.enioka.scanner.api.ScannerProvider; 6 | 7 | /** 8 | * Helper class pairing a ScannerProvider with its corresponding meta information object. 9 | */ 10 | public class ScannerProviderHolder implements Comparable { 11 | 12 | /** 13 | * The provider's meta information. 14 | */ 15 | ScannerProviderMeta meta; 16 | 17 | /** 18 | * The ScannerProvider wrapped by the holder. 19 | */ 20 | ScannerProvider provider; 21 | 22 | public ScannerProviderHolder(ScannerProvider provider, ScannerProviderMeta meta) { 23 | this.provider = provider; 24 | this.meta = meta; 25 | } 26 | 27 | public ScannerProviderMeta getMeta() { 28 | return meta; 29 | } 30 | 31 | public ScannerProvider getProvider() { 32 | return provider; 33 | } 34 | 35 | public void setMeta(ScannerProviderMeta meta) { 36 | this.meta = meta; 37 | } 38 | 39 | public void setProvider(ScannerProvider provider) { 40 | this.provider = provider; 41 | } 42 | 43 | @Override 44 | public int compareTo(@NonNull ScannerProviderHolder o) { 45 | return this.meta.compareTo(o.getMeta()); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/CapabilitiesRequest.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.bt.api.BluetoothScanner; 4 | import com.enioka.scanner.bt.api.Command; 5 | import com.enioka.scanner.sdk.zebraoss.data.CapabilitiesReply; 6 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 7 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiMonoPacketWrapper; 8 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiStatus; 9 | 10 | public class CapabilitiesRequest implements Command { 11 | private final SsiMonoPacketWrapper packet; 12 | 13 | public CapabilitiesRequest() { 14 | packet = new SsiMonoPacketWrapper(SsiCommand.CAPABILITIES_REQUEST.getOpCode(), SsiStatus.DEFAULT.getByte(), new byte[0]); 15 | } 16 | 17 | @Override 18 | public byte[] getCommand() { 19 | return packet.toCommandBuffer(false); 20 | } 21 | 22 | @Override 23 | public byte[] getCommand(final BluetoothScanner bluetoothScanner) { 24 | return packet.toCommandBuffer(bluetoothScanner.isBleDevice()); 25 | } 26 | 27 | @Override 28 | public Class getReturnType() { 29 | return CapabilitiesReply.class; 30 | } 31 | 32 | @Override 33 | public int getTimeOut() { 34 | return 2000; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/CommandExpectingNothing.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.bt.api.BluetoothScanner; 4 | import com.enioka.scanner.bt.api.Command; 5 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiMonoPacketWrapper; 6 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiStatus; 7 | 8 | public abstract class CommandExpectingNothing implements Command { 9 | private final SsiMonoPacketWrapper packet; 10 | 11 | public CommandExpectingNothing(byte opCode, byte[] data) { 12 | packet = new SsiMonoPacketWrapper(opCode, SsiStatus.DEFAULT.getByte(), data); 13 | } 14 | 15 | public CommandExpectingNothing(byte opCode) { 16 | packet = new SsiMonoPacketWrapper(opCode, SsiStatus.DEFAULT.getByte(), new byte[0]); 17 | } 18 | 19 | @Override 20 | public byte[] getCommand() { 21 | return packet.toCommandBuffer(false); 22 | } 23 | 24 | @Override 25 | public byte[] getCommand(final BluetoothScanner bluetoothScanner) { 26 | return packet.toCommandBuffer(bluetoothScanner.isBleDevice()); 27 | } 28 | 29 | @Override 30 | public Class getReturnType() { 31 | return null; 32 | } 33 | 34 | @Override 35 | public int getTimeOut() { 36 | return 1000; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_integrated/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | apply plugin: 'com.android.library' 3 | 4 | description 'Scanner provider for Honeywell integrated scanner devices' 5 | 6 | android { 7 | compileSdk 34 8 | defaultConfig { 9 | minSdkVersion 19 10 | targetSdkVersion 28 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | multiDexEnabled true 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'roguard-rules.pro' 18 | } 19 | } 20 | lint { 21 | disable 'ExpiredTargetSdkVersion' 22 | } 23 | namespace 'com.enioka.scanner.sdk.honeywelloss.integrated' 24 | } 25 | 26 | ext { 27 | mavenArtifactId = "provider-os-honeywell-integrated" 28 | } 29 | 30 | 31 | dependencies { 32 | // We need the APIs 33 | implementation project(':enioka_scan') 34 | 35 | // Linter helpers 36 | implementation 'com.android.support:support-annotations:28.0.0' 37 | 38 | // Test things (useless for now) 39 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 40 | exclude group: 'com.android.support', module: 'support-annotations' 41 | }) 42 | testImplementation 'junit:junit:4.13.2' 43 | } 44 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/data/ReplyRevision.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.data; 2 | 3 | import java.nio.charset.StandardCharsets; 4 | 5 | public class ReplyRevision { 6 | public String softwareRevision, boardType, engineCode; 7 | 8 | public ReplyRevision(byte[] buffer) { 9 | String temp = new String(buffer, StandardCharsets.US_ASCII); 10 | temp = temp.replaceAll(" {2,10}", " "); 11 | if (!temp.isEmpty()) { 12 | String[] segments = temp.split(" "); 13 | 14 | if (segments.length >= 3) { 15 | this.softwareRevision = segments[0]; 16 | this.boardType = segments[1]; 17 | this.engineCode = segments[2]; 18 | } 19 | } 20 | } 21 | 22 | @Override 23 | public String toString() { 24 | StringBuilder sb = new StringBuilder(); 25 | 26 | sb.append("SSI device revision report\n"); 27 | 28 | sb.append("S/W revision: "); 29 | sb.append(this.softwareRevision); 30 | sb.append("\n"); 31 | 32 | sb.append("Board Type, flash or non-flash: "); 33 | sb.append(this.boardType); 34 | sb.append("\n"); 35 | 36 | sb.append("Engine Code: "); 37 | sb.append(this.engineCode); 38 | sb.append("\n"); 39 | 40 | return sb.toString(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /enioka_scan_postech/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | 3 | description 'Scanner provider for Honeywell integrated scanner devices' 4 | 5 | android { 6 | compileSdk 34 7 | defaultConfig { 8 | minSdkVersion 19 9 | targetSdkVersion 28 10 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 11 | multiDexEnabled true 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'roguard-rules.pro' 17 | } 18 | } 19 | lint { 20 | disable 'ExpiredTargetSdkVersion' 21 | } 22 | namespace 'com.enioka.scanner.sdk.postech' 23 | } 24 | 25 | ext { 26 | mavenArtifactId = "provider-cs-postech" 27 | } 28 | 29 | 30 | dependencies { 31 | // We need the APIs 32 | implementation project(':enioka_scan') 33 | 34 | // General scan api is needed 35 | implementation project(':enioka_scan_generalscan') 36 | 37 | // Linter helpers 38 | implementation 'com.android.support:support-annotations:28.0.0' 39 | 40 | // Test things (useless for now) 41 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 42 | exclude group: 'com.android.support', module: 'support-annotations' 43 | }) 44 | testImplementation 'junit:junit:4.13.2' 45 | } 46 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | apply plugin: 'com.android.library' 3 | 4 | description 'Scanner provider for Honeywell bluetooth devices' 5 | 6 | android { 7 | compileSdk 34 8 | defaultConfig { 9 | minSdkVersion 19 10 | targetSdkVersion 28 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | multiDexEnabled true 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'roguard-rules.pro' 18 | } 19 | } 20 | lint { 21 | disable 'ExpiredTargetSdkVersion' 22 | } 23 | namespace 'com.enioka.scanner.sdk.honeywelloss.spp' 24 | } 25 | 26 | ext { 27 | mavenArtifactId = "provider-os-honeywell-bt" 28 | } 29 | 30 | 31 | dependencies { 32 | // We need the APIs 33 | implementation project(':enioka_scan') 34 | 35 | // Linter helpers 36 | implementation 'com.android.support:support-annotations:28.0.0' 37 | 38 | // Test things (useless for now) 39 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 40 | exclude group: 'com.android.support', module: 'support-annotations' 41 | }) 42 | androidTestImplementation project(path: ':enioka_scan_mock') 43 | testImplementation 'junit:junit:4.13.2' 44 | } 45 | -------------------------------------------------------------------------------- /enioka_scan_honeywelloss_spp/src/main/java/com/enioka/scanner/sdk/honeywelloss/spp/commands/DisplayScreenColor.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.honeywelloss.spp.commands; 2 | 3 | import com.enioka.scanner.api.ScannerLedColor; 4 | import com.enioka.scanner.bt.api.Command; 5 | 6 | public class DisplayScreenColor implements Command { 7 | private byte b1, b2; 8 | 9 | public DisplayScreenColor(ScannerLedColor color) { 10 | if (color == null) { 11 | b1 = 48; 12 | b2 = 48; 13 | return; 14 | } 15 | 16 | switch (color) { 17 | case GREEN: 18 | b1 = 49; 19 | b2 = 52; 20 | break; 21 | case RED: 22 | b1 = 49; 23 | b2 = 51; 24 | break; 25 | default: 26 | b1 = 0; 27 | b2 = 0; 28 | break; 29 | } 30 | } 31 | 32 | @Override 33 | public byte[] getCommand() { 34 | // GUITSTnn 35 | // 13 = red 36 | // 14 = green 37 | // SYN M CR ... 13/14 ! 38 | return new byte[]{22, 77, 13, 71, 85, 73, 84, 83, 84, b1, b2, 33}; 39 | } 40 | 41 | @Override 42 | public Class getReturnType() { 43 | return null; 44 | } 45 | 46 | @Override 47 | public int getTimeOut() { 48 | return 1000; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /enioka_scan/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/api/Command.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.api; 2 | 3 | /** 4 | * A command which can be sent to the scanner. 5 | * 6 | * @param Type of data expected in return (can be Void). 7 | */ 8 | public interface Command { 9 | /** 10 | * The command to send on the bluetooth socket. 11 | * 12 | * @return command. 13 | */ 14 | byte[] getCommand(); 15 | 16 | /** 17 | * The command to send on the bluetooth socket. 18 | * 19 | * @param bluetoothScanner The bluetoothScanner that may be used to adapt some parameters in the command generation. 20 | * @return command. 21 | */ 22 | default byte[] getCommand(final BluetoothScanner bluetoothScanner) { 23 | return getCommand(); 24 | } 25 | 26 | /** 27 | * The expected return type of the command (as in: the class returned by the parser when parsing an incoming stream from the scanner). Can be null.
28 | * Only useful because of Java generic type erasure - otherwise, we know it's the generic parameter T! 29 | * 30 | * @return a type deriving from T 31 | */ 32 | Class getReturnType(); 33 | 34 | /** 35 | * Every command may have a different timeout waiting for an answer. 0 means no timeout. Ignored when the command expects no answer (T is Void). 36 | * 37 | * @return time out in milliseconds. 38 | */ 39 | int getTimeOut(); 40 | } 41 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/api/ParsingResult.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.api; 2 | 3 | // TODO: simplify this, remove public access... 4 | 5 | /** 6 | * The result of parsing data coming from the device input stream. 7 | * 8 | * @param 9 | */ 10 | public class ParsingResult { 11 | 12 | /** 13 | * Constructs a result "All is OK, here is the data". 14 | * 15 | * @param data parsed data which could be given to callers. 16 | */ 17 | public ParsingResult(T data) { 18 | this.data = data; 19 | expectingMoreData = false; 20 | rejected = false; 21 | } 22 | 23 | /** 24 | * Constructs a result "All was read, this is a failure" 25 | * 26 | * @param result 27 | */ 28 | public ParsingResult(MessageRejectionReason result) { 29 | this.result = result; 30 | expectingMoreData = false; 31 | rejected = true; 32 | } 33 | 34 | /** 35 | * Constructs a result "need more data to continue". 36 | */ 37 | public ParsingResult() { 38 | } 39 | 40 | public boolean expectingMoreData = true; 41 | public boolean rejected = false; 42 | public MessageRejectionReason result; 43 | public T data; 44 | public Command acknowledger = null; 45 | public int read = 0; 46 | 47 | MessageRejectionReason getResult() { 48 | return this.result; 49 | } 50 | 51 | T getData() { 52 | return this.data; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /enioka_scan_camera/src/main/java/com/enioka/scanner/sdk/camera/ScannerCallback.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.camera; 2 | 3 | import android.graphics.Point; 4 | 5 | import com.enioka.scanner.data.BarcodeType; 6 | 7 | /** 8 | * Methods needed by the {@link FrameAnalyserManager} 9 | */ 10 | interface ScannerCallback { 11 | //////////////////////////////////////////////////////////////////////////////////////////////// 12 | // Main callbacks (analysis result handling) 13 | //////////////////////////////////////////////////////////////////////////////////////////////// 14 | 15 | /** 16 | * To be called when there is a valid scan result. 17 | * 18 | * @param result barcode read 19 | * @param type barcode type (as in Symbol class) 20 | * @param previewData the context used for this analysis. 21 | */ 22 | void analyserCallback(final String result, final BarcodeType type, FrameAnalysisContext previewData); 23 | 24 | /** 25 | * To be called after each analysis. 26 | * 27 | * @param analysisContext what was analysed 28 | */ 29 | void giveBufferBack(FrameAnalysisContext analysisContext); 30 | 31 | 32 | //////////////////////////////////////////////////////////////////////////////////////////////// 33 | // Resolution handling 34 | //////////////////////////////////////////////////////////////////////////////////////////////// 35 | 36 | void setPreviewResolution(Point newResolution); 37 | } 38 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/ParamSend.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 4 | 5 | /** 6 | * Set a given configuration parameter on the scanner. Usually not used directly but with a specific command overriding it. 7 | */ 8 | public class ParamSend extends CommandExpectingAck { 9 | public ParamSend(int parameter, byte value) { 10 | super(SsiCommand.PARAM_SEND.getOpCode(), getData(parameter, value)); 11 | } 12 | 13 | private static byte[] getData(int parameter, byte value) { 14 | // In all cases, the param array begins with 00 which means short beep on prm change. 15 | // Also, we keep the flag to 0x00 (default in base class) - means prm changes are temporary. 16 | byte[] data = new byte[0]; 17 | 18 | if (parameter > 0 && parameter <= 239) { 19 | data = new byte[]{0, (byte) parameter, value}; 20 | } else if (parameter <= 495) { 21 | data = new byte[]{0, (byte) -16, (byte) (parameter - 256), value}; // 0x00 0xF0 - 0x°° means short beep, F0 means from 256 to 495 22 | } else if (parameter <= 751) { 23 | data = new byte[]{0, (byte) -15, (byte) (parameter - 512), value}; 24 | } else if (parameter <= 1007) { 25 | data = new byte[]{0, (byte) -14, (byte) (parameter - 768), value}; 26 | } 27 | 28 | return data; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/proxies/ScannerConnectionHandlerProxy.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api.proxies; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | 6 | import com.enioka.scanner.api.Scanner; 7 | import com.enioka.scanner.api.callbacks.ScannerConnectionHandler; 8 | 9 | public class ScannerConnectionHandlerProxy implements ScannerConnectionHandler { 10 | protected final Handler uiHandler; 11 | protected final ScannerConnectionHandler wrappedHandler; 12 | 13 | public ScannerConnectionHandlerProxy(final ScannerConnectionHandler wrappedHandler) { 14 | this.uiHandler = new Handler(Looper.getMainLooper()); 15 | this.wrappedHandler = wrappedHandler; 16 | } 17 | 18 | @Override 19 | public void scannerConnectionProgress(final String providerKey, final String scannerKey, final String message) { 20 | uiHandler.post(() -> wrappedHandler.scannerConnectionProgress(providerKey, scannerKey, message)); 21 | } 22 | 23 | @Override 24 | public void scannerCreated(final String providerKey, final String scannerKey, final Scanner s) { 25 | uiHandler.post(() -> wrappedHandler.scannerCreated(providerKey, scannerKey, s)); 26 | } 27 | 28 | @Override 29 | public void noScannerAvailable() { 30 | uiHandler.post(wrappedHandler::noScannerAvailable); 31 | } 32 | 33 | @Override 34 | public void endOfScannerSearch() { 35 | uiHandler.post(wrappedHandler::endOfScannerSearch); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # enioka Haute Couture Android Barcode Scanning Library 2 | 3 | This library makes the integration of all barcode scanners easy in any Android application, 4 | avoiding vendor lock-in and lowering the cost of advanced scanner integration. 5 | 6 | It is compatible with a wide variety of scanning devices, integrated or external, from different 7 | vendors such as Zebra, Honeywell, Athesi and more. 8 | 9 | When there are no compatible hardware devices available, the library provides a camera reader based 10 | on [ZBar](https://mvnrepository.com/artifact/me.dm7.barcodescanner/zbar) (default) or 11 | [ZXing](https://mvnrepository.com/artifact/com.google.zxing/core). 12 | 13 | Through a common abstraction, it provides access to the following methods (provided the hardware 14 | supports them): 15 | - press/release the scanner's trigger 16 | - pause/resume scanning abilities 17 | - disconnect/reconnect scanners 18 | - enable/disable illumination from the scanner 19 | - enable/disable colored LEDs 20 | - set scanner enabled symbologies 21 | 22 | Finally, it provides a ready to use Service that handles scanner lifecycles, as well as a template 23 | Activity, and a demo application, allowing you to use scanners in a matter of minutes. 24 | 25 | :::{toctree} 26 | :numbered: 27 | :maxdepth: 3 28 | :titlesonly: 29 | 30 | quickstart 31 | dependencies 32 | guides/index 33 | api/index 34 | develop 35 | ::: 36 | 37 | :::{seealso} 38 | 39 | * The [GitHub repository](https://github.com/enioka-Haute-Couture/enioka_scan) of the library 40 | ::: -------------------------------------------------------------------------------- /enioka_scan_m3/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | 3 | description 'Scanner provider for M3 bluetooth ring devices using the official drivers (not provided)' 4 | 5 | android { 6 | compileSdk 34 7 | defaultConfig { 8 | minSdkVersion 19 9 | targetSdkVersion 28 10 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 11 | } 12 | buildTypes { 13 | release { 14 | minifyEnabled false 15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 16 | } 17 | } 18 | lint { 19 | disable 'ExpiredTargetSdkVersion' 20 | } 21 | namespace 'com.enioka.scanner.sdk.m3' 22 | } 23 | 24 | ext { 25 | mavenArtifactId = "provider-cs-m3" 26 | } 27 | 28 | dependencies { 29 | implementation project(':enioka_scan') 30 | 31 | // Linter helpers 32 | implementation 'com.android.support:support-annotations:28.0.0' 33 | 34 | // Libs contains SDK. This lib has to be included as it is not provided by the device. 35 | if (gradle.ext.gpr != null) { 36 | compileOnly 'com.enioka.hc.external:m3-bt-driver:0.1.0' 37 | } else { 38 | compileOnly fileTree(dir: 'libs', include: ['*.jar']) 39 | } 40 | 41 | // Test things (useless for now) 42 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 43 | exclude group: 'com.android.support', module: 'support-annotations' 44 | }) 45 | testImplementation 'junit:junit:4.13.2' 46 | } 47 | -------------------------------------------------------------------------------- /enioka_scan_zebra_dw/src/main/java/com/enioka/scanner/sdk/zebra/dw/ZebraDwIntents.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebra.dw; 2 | 3 | public class ZebraDwIntents { 4 | static final String DW_MAIN_CALLBACK_ACTION = "com.dw.ACT"; 5 | static final String DW_CONFIGURATION_CALLBACK_ACTION = "com.symbol.datawedge.api.RESULT_ACTION"; 6 | static final String DW_STATUS_CALLBACK_ACTION = "com.symbol.datawedge.scanner_status"; 7 | static final String DW_API_MAIN_ACTION = "com.symbol.datawedge.api.ACTION"; 8 | static final String DW_NOTIFICATION_ACTION = "com.symbol.datawedge.api.NOTIFICATION_ACTION"; 9 | 10 | static final String DW_BARCODE_DATA_EXTRA = "com.symbol.datawedge.data_string"; 11 | static final String DW_BARCODE_TYPE_EXTRA = "com.symbol.datawedge.label_type"; 12 | static final String DW_API_PARAM_EXTRA = "com.symbol.datawedge.api.SWITCH_SCANNER_PARAMS"; 13 | static final String DW_API_CMD_ID_EXTRA = "COMMAND_IDENTIFIER"; 14 | static final String DW_API_GET_STATUS_EXTRA = "com.symbol.datawedge.api.GET_SCANNER_STATUS"; 15 | static final String DW_NOTIFICATION_EXTRA = "com.symbol.datawedge.api.NOTIFICATION"; 16 | static final String DW_NOTIFICATION_TYPE_EXTRA = "NOTIFICATION_TYPE"; 17 | static final String DW_NOTIFICATION_CHANGE_STATUS = "SCANNER_STATUS"; 18 | static final String DW_NOTIFICATION_CHANGE_PROFILE = "PROFILE_SWITCH"; 19 | static final String DW_NOTIFICATION_CHANGE_WORKFLOW = "WORKFLOW_STATUS"; 20 | static final String DW_NOTIFICATION_CHANGE_CONFIGURATION = "CONFIGURATION_UPDATE"; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /enioka_scan_koamtac/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | 3 | description 'Scanner provider for Koamtac devices using the official KDC driver (not provided)' 4 | 5 | android { 6 | compileSdk 34 7 | defaultConfig { 8 | minSdkVersion 19 9 | targetSdkVersion 28 10 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 11 | } 12 | buildTypes { 13 | release { 14 | minifyEnabled false 15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 16 | } 17 | } 18 | lint { 19 | disable 'ExpiredTargetSdkVersion' 20 | } 21 | namespace 'com.enioka.scanner.sdk.koamtac' 22 | } 23 | 24 | ext { 25 | mavenArtifactId = "provider-cs-koamtac" 26 | } 27 | 28 | dependencies { 29 | implementation project(':enioka_scan') 30 | 31 | // Linter helpers 32 | implementation 'com.android.support:support-annotations:28.0.0' 33 | 34 | // Libs contains Koamtac SDK. This lib has to be included as it is not provided by the device. 35 | if (gradle.ext.gpr != null) { 36 | compileOnly 'com.enioka.hc.external:koamtac-kdc-driver:3.05.10' 37 | } else { 38 | compileOnly fileTree(dir: 'libs', include: ['*.jar']) 39 | } 40 | 41 | // Test things (useless for now) 42 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 43 | exclude group: 'com.android.support', module: 'support-annotations' 44 | }) 45 | testImplementation 'junit:junit:4.12' 46 | } 47 | -------------------------------------------------------------------------------- /npm_integration_frameworks/reactnative/android/src/main/java/com/activitystarter/ActivityStarterModule.java: -------------------------------------------------------------------------------- 1 | package com.activitystarter; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.util.Log; 6 | 7 | import com.facebook.react.bridge.ReactApplicationContext; 8 | import com.facebook.react.bridge.ReactContext; 9 | import com.facebook.react.bridge.ReactContextBaseJavaModule; 10 | import com.facebook.react.bridge.ReactMethod; 11 | 12 | public final class ActivityStarterModule extends ReactContextBaseJavaModule { 13 | 14 | private String LOG_TAG = "ORDER_RUN -- ActivityStarterModule"; 15 | 16 | ActivityStarterModule(ReactApplicationContext context) { 17 | super(context); 18 | Log.d(LOG_TAG, "ActivityStarterModule constructor called"); 19 | } 20 | 21 | @Override 22 | public String getName() { 23 | Log.d(LOG_TAG, "ActivityStarterModule::getName requested"); 24 | return "ActivityStarterModule"; 25 | } 26 | 27 | @ReactMethod 28 | void startActivityByName(String targetActivity) { 29 | Log.d(LOG_TAG, "ActivityStarterModule::startActivityByName"); 30 | Activity activity = getCurrentActivity(); 31 | try { 32 | Class klass = Class.forName(targetActivity); 33 | Intent intent = new Intent(activity, klass); 34 | activity.startActivity(intent); 35 | } 36 | catch (Exception e) { 37 | Log.e(LOG_TAG, e.toString()); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/commands/ManagementCommandGetBufferSize.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.commands; 2 | 3 | import com.enioka.scanner.bt.api.BluetoothScanner; 4 | import com.enioka.scanner.bt.api.Command; 5 | import com.enioka.scanner.sdk.zebraoss.data.RsmAttributeReply; 6 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiCommand; 7 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiMonoPacketWrapper; 8 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiStatus; 9 | 10 | /** 11 | * Special management command which should be sent before all others, requesting the RSM buffer size. 12 | */ 13 | public class ManagementCommandGetBufferSize implements Command { 14 | private final SsiMonoPacketWrapper packet; 15 | 16 | public ManagementCommandGetBufferSize() { 17 | packet = new SsiMonoPacketWrapper(SsiCommand.SSI_MGMT_COMMAND.getOpCode(), SsiStatus.DEFAULT.getByte(),new byte[]{0x00, 0x06, 0x20, 0x00, (byte) 0xFF, (byte) 0xFF}); 18 | } 19 | 20 | @Override 21 | public byte[] getCommand() { 22 | return packet.toCommandBuffer(false); 23 | } 24 | 25 | @Override 26 | public byte[] getCommand(final BluetoothScanner bluetoothScanner) { 27 | return packet.toCommandBuffer(bluetoothScanner.isBleDevice()); 28 | } 29 | 30 | @Override 31 | public Class getReturnType() { 32 | return RsmAttributeReply.class; 33 | } 34 | 35 | @Override 36 | public int getTimeOut() { 37 | return 1000; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /enioka_scan_honeywell/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'scanner.published-library' 2 | 3 | description 'Scanner provider for Honeywell devices using the official AIDC driver (not provided)' 4 | 5 | android { 6 | compileSdk 34 7 | defaultConfig { 8 | minSdkVersion 19 9 | targetSdkVersion 28 10 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 11 | } 12 | buildTypes { 13 | release { 14 | minifyEnabled false 15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 16 | } 17 | } 18 | lint { 19 | disable 'ExpiredTargetSdkVersion' 20 | } 21 | namespace 'com.enioka.scanner.sdk.honeywell' 22 | } 23 | 24 | ext { 25 | mavenArtifactId = "provider-cs-honeywell" 26 | } 27 | 28 | dependencies { 29 | implementation project(':enioka_scan') 30 | 31 | // Linter helpers 32 | implementation 'com.android.support:support-annotations:28.0.0' 33 | 34 | // Libs contains Honeywell SDK. This lib has to be included as it is not provided by the device. 35 | if (gradle.ext.gpr != null) { 36 | compileOnly 'com.enioka.hc.external:honeywell-bt-driver:1.37.0' 37 | } else { 38 | compileOnly fileTree(dir: 'libs', include: ['*.aar']) 39 | } 40 | 41 | // Test things (useless for now) 42 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 43 | exclude group: 'com.android.support', module: 'support-annotations' 44 | }) 45 | testImplementation 'junit:junit:4.12' 46 | } 47 | -------------------------------------------------------------------------------- /enioka_scan_proglove/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 23 | 24 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/api/callbacks/ScannerConnectionHandler.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.api.callbacks; 2 | 3 | import com.enioka.scanner.LaserScanner; 4 | import com.enioka.scanner.api.Scanner; 5 | import com.enioka.scanner.api.ScannerSearchOptions; 6 | 7 | /** 8 | * Interface to implement in order to be able to retrieve scanners created by {@link LaserScanner} (the main scanner factory). 9 | */ 10 | public interface ScannerConnectionHandler { 11 | /** 12 | * A SDK-specific message signaling a change during the search for a scanner. 13 | * 14 | * @param scannerKey a unique identifier for the scanner being connected. 15 | * @param message a SDK-specific message (localized) 16 | */ 17 | void scannerConnectionProgress(final String providerKey, final String scannerKey, final String message); 18 | 19 | /** 20 | * Called when a scanner was found and created. Depending on {@link ScannerSearchOptions#returnOnlyFirst} may be called multiple times. 21 | * 22 | * @param scannerKey a unique identifier for the scanner being connected. 23 | * @param s the new scanner. Never null. 24 | */ 25 | void scannerCreated(final String providerKey, final String scannerKey, final Scanner s); 26 | 27 | /** 28 | * Called when there is no scanner available on the device. {@link #endOfScannerSearch()} is always called after this. 29 | */ 30 | void noScannerAvailable(); 31 | 32 | /** 33 | * Called when the search for scanners in the different providers is over. 34 | */ 35 | void endOfScannerSearch(); 36 | } 37 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/SsiOverSppParser.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss; 2 | 3 | import com.enioka.scanner.bt.api.ParsingResult; 4 | import com.enioka.scanner.bt.api.ScannerDataParser; 5 | import com.enioka.scanner.sdk.zebraoss.ssi.SsiParser; 6 | 7 | /** 8 | * Wraps the handling of SSI packets contained in (possibly multiple) SPP packets. 9 | */ 10 | public class SsiOverSppParser implements ScannerDataParser { 11 | private static final SsiParser ssiParser = new SsiParser(); 12 | 13 | private byte[] ssiBuffer = new byte[0]; 14 | private int packetLength = 0; 15 | private int read = 0; 16 | 17 | @Override 18 | public ParsingResult parse(byte[] buffer, int offset, int dataLength) { 19 | ParsingResult res = new ParsingResult(); 20 | 21 | if (packetLength == 0 || ssiBuffer.length == 0) { // new SSI packet 22 | packetLength = (char) (buffer[offset] & 0xFF); 23 | packetLength += 2; // include checksum 24 | ssiBuffer = new byte[packetLength]; 25 | } 26 | 27 | System.arraycopy(buffer, offset, ssiBuffer, read, Math.min(dataLength - offset, packetLength - read)); 28 | read += Math.min(dataLength, packetLength - read); 29 | res.read = read; 30 | 31 | if (read == packetLength) { // SSI packet is complete 32 | res = ssiParser.parse(ssiBuffer, 0, packetLength); 33 | ssiBuffer = new byte[0]; 34 | packetLength = 0; 35 | read = 0; 36 | } else { // SSI packet is incomplete 37 | res.expectingMoreData = true; 38 | } 39 | 40 | return res; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /enioka_scan_zebraoss/src/main/java/com/enioka/scanner/sdk/zebraoss/ssi/SsiMonoPacketWrapper.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.sdk.zebraoss.ssi; 2 | 3 | /** 4 | * Encapsulates the SsiMonoPacket class to separate the protocol-dependant bytearray generation. 5 | */ 6 | public class SsiMonoPacketWrapper extends SsiMonoPacket { 7 | 8 | public SsiMonoPacketWrapper(byte packetLengthWithoutChecksum, byte opCode, byte status, byte[] data, byte checksumMsb, byte checksumLsb) { 9 | super(packetLengthWithoutChecksum, opCode, status, data, checksumMsb, checksumLsb); 10 | } 11 | 12 | public SsiMonoPacketWrapper(byte opCode, byte status, byte[] data) { 13 | super(opCode, status, data); 14 | } 15 | 16 | /** 17 | * Generates the raw packet bytearray. 18 | */ 19 | public byte[] toCommandBuffer(final boolean ble) { 20 | validateLengthAndChecksum(); 21 | 22 | final int totalLength = (ble ? 2 : 0) + 4 + data.length + 2; // bleLength + header + data + checksum 23 | final int offset = (ble ? 2 : 0); 24 | 25 | final byte[] buffer = new byte[totalLength]; 26 | 27 | if (ble) { 28 | buffer[offset - 2] = (byte) (totalLength & 0xFF); 29 | buffer[offset - 1] = (byte) ((totalLength >> 8) & 0xFF); 30 | } 31 | buffer[offset] = packetLengthWithoutChecksum; 32 | buffer[offset + 1] = opCode; 33 | buffer[offset + 2] = source; 34 | buffer[offset + 3] = status; 35 | System.arraycopy(data, 0, buffer, offset + 4, data.length); 36 | buffer[totalLength - 2] = checksumMsb; 37 | buffer[totalLength - 1] = checksumLsb; 38 | 39 | return buffer; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /enioka_scan_zebra/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 14 | 15 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /enioka_scan/src/main/java/com/enioka/scanner/bt/api/BluetoothScanner.java: -------------------------------------------------------------------------------- 1 | package com.enioka.scanner.bt.api; 2 | 3 | import com.enioka.scanner.api.proxies.ScannerStatusCallbackProxy; 4 | 5 | /** 6 | * Represents a connected SPP device, and can be used to run commands on it. 7 | */ 8 | public interface BluetoothScanner { 9 | /** 10 | * Run a command on the scanner. Asynchronous - this call returns before the command is actually sent to the scanner.
11 | * If the command expects an answer, it will be received as any data from the scanner and sent to the registered {@link ScannerDataParser} 12 | * (there is no direct "link" between command and response). 13 | * 14 | * @param command what should be run 15 | * @param subscription an optional subscription waiting for an asnwer to the command 16 | * @param expected return type of the command (implicit, found from command argument) 17 | */ 18 | void runCommand(final Command command, final DataSubscriptionCallback subscription); 19 | 20 | /** 21 | * @return the BT name 22 | */ 23 | String getName(); 24 | 25 | /** 26 | * Fully disconnects from the device. It will not try to reconnect. 27 | */ 28 | void disconnect(); 29 | 30 | void registerSubscription(final DataSubscriptionCallback subscription, final Class targetType); 31 | 32 | /** 33 | * Updates the scanner's status callback. 34 | */ 35 | void registerStatusCallback(final ScannerStatusCallbackProxy statusCallback); 36 | 37 | /** 38 | * @return true if the device uses BLE, false if the device uses classic bluetooth 39 | */ 40 | boolean isBleDevice(); 41 | } 42 | --------------------------------------------------------------------------------