Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesHow to use the qr and barcode scanner on a supported pax device.
This functionality is currently only available on the pax A77 terminal. The following code snippet demonstrates how you can use the dedicated qr and barcode scanner on a supported pax device and getting the scanned result.
HardwareService paxService = new PaxService();
BarcodeScannerDelegate barcodeScannerDelegate = new BarcodeScannerDelegate() {
@Override
public void onSuccess(String barcodeScannerResult) {
//scan completed
}
@Override
public void onError(Error error) {
// scan failed
}
};
paxService.scanBarcode(1000, barcodeScannerDelegate, getBaseContext());
The following code snippet demonstrates how you can use the camera qr and barcode scanner on a supported pax device (= Types A920, A77 & IM30) and getting the scanned result.
//SurfaceView from Layout
SurfaceView surfaceView;
HardwareService paxService = new PaxService();
BarcodeScannerDelegate barcodeScannerDelegate = new BarcodeScannerDelegate() {
@Override
public void onSuccess(String barcodeScannerResult) {
//scan completed
}
@Override
public void onError(Error error) {
// scan failed
}
};
paxService.scanBarcode(surfaceView, barcodeScannerDelegate, activity);
//Make sure to close camera by calling stopScanBarcode
@Override
protected void onDestroy() {
if(paxService != null){
paxService.stopScanBarcode();
}
super.onDestroy();
}
Supported Scancodes: