-
Notifications
You must be signed in to change notification settings - Fork 147
Cordova Android on Ionic Requires alert to activate the scanner before CardIO.canScan #43
Comments
@sbasi5576: See my forked commits, hoping to get this merged soon: #44 |
Thanks. How do I install this fix? |
would these the lines highlighted in red or green? sorry i have never submitted anything on github. I'm someone who is coming back to tech after spending more than 10 years in business through the bschool route :) |
@sbasi5576 click on the #44 link and scroll down until you see the commit hash and click on it. You will then see a unified diff view that summarizes the changes I made. Red lines mean changed code. Green means new code. Use my changes (right hand side) and see if those changes help you. Please google "learn github" or "how to use git" so you can maximize github usage! Submit your repository to github and I can take a look if you want. |
@lolptdr I have literally replaced the original files with the files you are trying to check-in. The scan was not successful without the alert. It didn't resolve the issue I am trying to. |
@sbasi5576: please checkin your project into github and we can take a look |
@lolptdr I would love to but unfortunately I have the customer proprietary code in it. |
I did more debugging by using document.addEventListener("deviceready", onDeviceReady, false); |
CardIO.canScan(onCardIOCheck) was interrupting the scan flow. I commented it out and that addressed the issue. |
Required Information
Issue Description
I am using Ionic platform.
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 Android not any other platform.
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");
The text was updated successfully, but these errors were encountered: