ZBar
The ZBar Scanner Plugin allows you to scan 2d barcodes.
Requires Cordova plugin: cordova-plugin-cszbar
. For more info, please see the zBar plugin docs.
联系我们?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.
Ionic 扫码ZBar插件的安装(Installation)
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
Ionic 扫码ZBar插件支持的平台(Supported Platforms)
- Android
- iOS
Ionic 扫码ZBar插件的用法(Usage)
import { ZBar, ZBarOptions } from '@ionic-native/zbar/ngx';
constructor(private zbar: ZBar) { }
...
let options: ZBarOptions = {
flash: 'off',
drawSight: false
}
this.zbar.scan(options)
.then(result => {
console.log(result); // Scanned code
})
.catch(error => {
console.log(error); // Error message
});