Search code examples
androidangularjscordovaionic-frameworkcardio

Ionic CardIO on Android doesn't trigger unless an alert is inserted


Platforms: Android 5.1 and Android 6.1

Unless I put an alert before the CardIO.canScan the camera scans the card or form can take a manual entry but doesn't return anything. It seems like the alert triggers some event that invokes the scanner's complete capability. I tried using other methods such as consoles.log or $cordovaDialogs.beep(3) so that I don't have to use an alert but no success. The issue is only for iOS not any other platform. Even tried device ready that doesn't work.

CardIO.scan({ "collect_card_number": true, "collect_expiry": false, "requireExpiry": false, "collect_cvv": false, "requireCVV": false, "collect_zip": false, "shows_first_use_alert": true, "disable_manual_entry_buttons": false, "keepApplicationTheme":true, "useCardIOLogo":true, "hideCardIOLogo": true }, onCardIOComplete, onCardIOCancel );

alert("Success");

CardIO.canScan(onCardIOCheck);


Solution

  • CardIO.canScan(onCardIOCheck) was interrupting the scan flow. I commented it out and that addressed the issue.