我正在尝试在我的Android应用中使用card.io来扫描卡并实施以下内容,
private void requestCardIOScan() {
Intent scanIntent = new Intent(getActivity(), CardIOActivity.class);
// customize these values to suit your needs.
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true); // default: false
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, false); // default: false
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, false); // default: false
scanIntent.putExtra(CardIOActivity.EXTRA_USE_PAYPAL_ACTIONBAR_ICON, false);
scanIntent.putExtra(CardIOActivity.EXTRA_USE_CARDIO_LOGO, false);
scanIntent.putExtra(CardIOActivity.EXTRA_HIDE_CARDIO_LOGO, true);
scanIntent.putExtra(CardIOActivity.EXTRA_KEEP_APPLICATION_THEME, true);
// MY_SCAN_REQUEST_CODE is arbitrary and is only used within this activity.
startActivityForResult(scanIntent, 100);
}
然而,即使我在卡片周围出现绿色条纹(我认为这意味着卡片被正确检测到),卡片扫描似乎永远不会完成。我在这里做错了吗?
BTW,认为值得一提的是我正在尝试使用三星S5和S6 Edge。答案 0 :(得分:4)
仅供参考
card.io扫描的有效卡片图片,它适用于我(10-02-2018)
此图片是从以下网址从互联网复制的 https://cdn.moneycrashers.com/wp-content/uploads/2016/02/capital-one-secured-mastercard.jpg
答案 1 :(得分:0)