{"id":19055549,"url":"https://github.com/duytq94/react-native-honeywell-barcode-reader","last_synced_at":"2025-04-24T04:23:02.978Z","repository":{"id":57337427,"uuid":"163074099","full_name":"duytq94/react-native-honeywell-barcode-reader","owner":"duytq94","description":"Support read barcode from Honeywell devices","archived":false,"fork":false,"pushed_at":"2020-10-12T03:10:11.000Z","size":103,"stargazers_count":2,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T12:18:57.852Z","etag":null,"topics":["barcode-reader","barcode-scanner","honeywell-devices"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-honeywell-barcode-reader","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duytq94.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-25T10:47:09.000Z","updated_at":"2022-08-08T18:18:10.000Z","dependencies_parsed_at":"2022-09-13T02:41:24.090Z","dependency_job_id":null,"html_url":"https://github.com/duytq94/react-native-honeywell-barcode-reader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duytq94%2Freact-native-honeywell-barcode-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duytq94%2Freact-native-honeywell-barcode-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duytq94%2Freact-native-honeywell-barcode-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duytq94%2Freact-native-honeywell-barcode-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duytq94","download_url":"https://codeload.github.com/duytq94/react-native-honeywell-barcode-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250561424,"owners_count":21450418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barcode-reader","barcode-scanner","honeywell-devices"],"created_at":"2024-11-08T23:46:00.361Z","updated_at":"2025-04-24T04:23:02.899Z","avatar_url":"https://github.com/duytq94.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Honeywell Barcode Reader\n\nThis package works with Honeywell devices that have an integrated barcode scanner, like the Honeywell EDA50K (tested).\n\nActually, I custom from https://github.com/Volst/react-native-honeywell-scanner but fix cannot remove event listener (even you close the reader). And if you don't remove, the event will fire twice, triple... more and more times when you call `addListener` until you kill the app.\n\nThe bug at here is you can not remove event listener by call `DeviceEventEmitter.removeListener(eventName, handler)` since it doesn't have this method. Follow here: https://stackoverflow.com/questions/36886628/how-do-you-remove-a-listener-from-react-natives-eventemitter-instance\n\n## Installation\n\n```\nnpm i react-native-honeywell-barcode-reader\n```\n\n## Link automatically:\n\n```\nreact-native link react-native-honeywell-barcode-reader\n```\n\n## Link manually (recommend):\n\n1. In `app\\build.gradle` add\n```\ncompile project(':react-native-honeywell-barcode-reader')\n```\n\n2. In `settings.gradle` add\n\n```\ninclude ':react-native-honeywell-barcode-reader'\nproject(':react-native-honeywell-barcode-reader').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-honeywell-barcode-reader/android')\n```\n\n3. In `MainApplication.java`\n\nAdd this line to import package\n```\nimport com.duytq94.HoneywellBarcodeReader.HoneywellBarcodeReaderPackage;\n```\nand add this line to getPackages()\n```\nnew HoneywellBarcodeReaderPackage()\n```\n\n## Usage\n\nFirst you'll want to check whether the device is a Honeywell scanner:\n\n```js\nimport HoneywellBarcodeReader from 'react-native-honeywell-barcode-reader';\n\nHoneywellBarcodeReader.isCompatible // true or false\n```\n\nThe barcode reader needs to be \"claimed\" by your application; meanwhile no other application can use it. You can do that like this:\n\n```js\nHoneywellBarcodeReader.startReader().then((claimed) =\u003e {\n    console.log(claimed ? 'Barcode reader is claimed' : 'Barcode reader is busy');\n});\n```\n\nTo get events from the barcode scanner:\n\n```js\nHoneywellBarcodeReader.onBarcodeReadSuccess(event =\u003e {\n    console.log('Received data', event);\n});\n\nHoneywellBarcodeReader.onBarcodeReadFail(() =\u003e {\n    console.log('Barcode read failed');\n});\n```\n\nTo free the claim and stop the reader, also freeing up resources:\n\n```js\nHoneywellBarcodeReader.stopReader().then(() =\u003e {\n    console.log('Freedom!');\n});\n```\n\nTo stop receiving events:\n\n```js\nHoneywellBarcodeReader.offBarcodeReadSuccess();\nHoneywellBarcodeReader.offBarcodeReadFail();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduytq94%2Freact-native-honeywell-barcode-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduytq94%2Freact-native-honeywell-barcode-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduytq94%2Freact-native-honeywell-barcode-reader/lists"}