Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/24jieqi/react-native-sunmi-eid
🆔 商米身份证云解析 React Native 原生模块
https://github.com/24jieqi/react-native-sunmi-eid
native-module react-native sunmi
Last synced: 5 days ago
JSON representation
🆔 商米身份证云解析 React Native 原生模块
- Host: GitHub
- URL: https://github.com/24jieqi/react-native-sunmi-eid
- Owner: 24jieqi
- License: mit
- Created: 2021-10-28T01:27:09.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-14T09:49:37.000Z (almost 3 years ago)
- Last Synced: 2024-04-16T20:07:18.449Z (7 months ago)
- Topics: native-module, react-native, sunmi
- Language: Java
- Homepage:
- Size: 418 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-sunmi-eid
sunmi eid service for react-native app
商品身份证云识别 react-native 实现
## Installation
```sh
npm install react-native-sunmi-eid
```## Usage
```js
import SunmiEid from "react-native-sunmi-eid";// 初始化,建议全局只初始化一次
SunmiEid.init({
appKey: '',
appId: ''
}).then(() => {
...
})
// 手动开启读卡
SunmiEid.startCheckCard()
// 手动关闭读卡
SunmiEid.stopCheckCard()// 监听读卡过程中状态变更
const removeEvent = SunmiEid.listen(
(payload) => {
console.log('stateChange', payload.status);
},
(error) => {
console.log('error', error);
}
);```
> 更详细的使用方式请查看 example
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT