Customize phonegap-plugin-barcodescanner
in project root directory...
1- create directory and clone plugin
$ mkdir customPlugins
$ cd customPlugins
$ git clone https://github.com/phonegap/phonegap-plugin-barcodescanner.git
$ cd ..
2- Remove older plugins
check if phonegap-plugin-barcodescanner is in plugins, also remove possible older references in config.xml or package.json.
$ ionic cordova plugin rm phonegap-plugin-barcodescanner
3- Add plugin
$ ionic cordova plugin add './customPlugins/phonegap-plugin-barcodescanner/'
4- run in device to check that is working.
How to customize camera overlay in Android
Here is the link to the Android barcode scanner repository: phonegap-plugin-barcodescanner -> src -> android -> README
1 - Clone repository
https://github.com/EddyVerbruggen/barcodescanner-lib-aar and open it in android studio
Camera Overlay layout is capture.xml in res -> layout folder and it's controller is CaptureActivity.java in java -> client -> android.
2- Do whatever you want... & Generate your new Library
go to root project folder -> barcodescanner -> build -> outputs -> aar -> delete folder or content
go to gradle tools window (usually top right corner of android studio) and get execute task build
barcodescanner-lib-aar -> barcodescanner -> Tasks -> build (double click)
3- Open new generated aar file (barcodescanner-release.aar)
barcodescanner -> build -> outputs -> car
4- Go to ionic project and find barcodescanner-release-2.1.5.aar in customPlugin/phonegap-plugin-barcodescanner...
change barcodescanner-release.aar name to barcodescanner-release-2.1.5.aar and replace it in customPlugin/...
5- remove old plugin
$ ionic cordova plugin rm phonegap-plugin-barcodescanner
and re add it again
$ ionic cordova plugin add './customPlugins/phonegap-plugin-barcodescanner/'
6- Check if everything it's working again (maybe have to remove platforms and add them again)
For iOS is you can refer this link
https://forum.ionicframework.com/t/how-to-change-barcode-scanner-overlay-img-when-scanning/86095