{"id":26266096,"url":"https://github.com/react-native-studio/react-native-android-barcodescanner","last_synced_at":"2025-04-30T16:46:33.720Z","repository":{"id":57335208,"uuid":"123521554","full_name":"react-native-studio/react-native-android-barcodescanner","owner":"react-native-studio","description":"android扫码插件,解决android上zxing扫码慢的问题，该插件使用的是zbar","archived":false,"fork":false,"pushed_at":"2018-03-02T06:17:16.000Z","size":78,"stargazers_count":7,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-30T18:02:12.149Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/react-native-studio.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-03-02T02:50:22.000Z","updated_at":"2020-12-21T06:45:53.000Z","dependencies_parsed_at":"2022-08-24T20:21:18.133Z","dependency_job_id":null,"html_url":"https://github.com/react-native-studio/react-native-android-barcodescanner","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/react-native-studio%2Freact-native-android-barcodescanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-studio%2Freact-native-android-barcodescanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-studio%2Freact-native-android-barcodescanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-studio%2Freact-native-android-barcodescanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-native-studio","download_url":"https://codeload.github.com/react-native-studio/react-native-android-barcodescanner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251747766,"owners_count":21637404,"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":[],"created_at":"2025-03-14T03:16:49.943Z","updated_at":"2025-04-30T16:46:33.695Z","avatar_url":"https://github.com/react-native-studio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## react-native-android-barcodescanner [![npm version](https://badge.fury.io/js/react-native-android-barcodescanner.svg)](https://badge.fury.io/js/react-native-android-barcodescanner)\n## 第一步\n工程目录下运行 npm install --save react-native-android-barcodescanner 或者 yarn add react-native-android-barcodescanner(已经安装了yarn)\n\n### 注意：\nversion 0.1.1适用于大于等于rn0.44和小于0.47\u003cbr/\u003e\nversion 0.1.5适用于rn0.47及以上\n加入```\u003cuses-permission android:name=\"android.permission.CAMERA\" /\u003e```权限\n## 第二步\n运行 react-native link react-native-android-barcodescanner\n## 第三部使用\n在工程中导入：\n```bash\nimport ZbarScannerView from 'react-native-android-barcodescanner';\n\u003cZbarScannerView\n            style={{flex:1}}\n            onScanResultReceived={(data)=\u003e{ToastAndroid.show(JSON.stringify(data),ToastAndroid.SHORT)}}\n            hintText={''}\n            renderTopBarView={() =\u003e \u003cView\u003e\u003c/View\u003e}\n            renderBottomMenuView={() =\u003e \u003cView\u003e\u003c/View\u003e}\n        /\u003e\n\u003cbr/\u003e\n```\n## Props\n\n![](https://github.com/MarnoDev/AC-QRCode-RN/blob/master/screenshots/ac-qrcode-props.jpg)\n\n|Prop|Type|Default|Optional|\n|:--:|:--:|:--:|:--:|\n|maskColor|string|#0000004D|true|\n|borderColor|string|#000000|true|\n|cornerColor|string|#000000|true|\n|borderWidth|number|0|true|\n|cornerBorderWidth|number|4|true|\n|cornerBorderLength|number|20|true|\n|rectHeight|number|200|true|\n|rectWidth|number|200|true|\n|isCornerOffset|bool|false|true|\n|cornerOffsetSize|number|0|true|\n|bottomMenuHeight|number|0|true|\n|scanBarAnimateTime|number|2500|true|\n|scanBarColor|string|#22ff00|true|\n|scanBarImage|any|null|true|\n|scanBarHeight|number|1.5|true|\n|scanBarMargin|number|6|true|\n|hintText|string|将二维码/条码放入框内，\u003c/br\u003e即可自动扫描|true|\n|hintTextStyle|object|{ color: '#fff', \u003c/br\u003efontSize: 14,\u003c/br\u003ebackgroundColor:'transparent'}|true|\n|hintTextPosition|number|130|true|\n|isShowScanBar|bool|true|true|\n|bottomMenuStyle|object|-|true|\n|renderTopBarView|func|-|flase|\n|renderBottomMenuView|func|-|false|\n|onScanResultReceived|func|-|false|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-studio%2Freact-native-android-barcodescanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-native-studio%2Freact-native-android-barcodescanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-studio%2Freact-native-android-barcodescanner/lists"}