card.io provides fast, easy credit card scanning in mobile apps.
Please be sure to keep your app up to date with the latest version of the SDK.All releases follow semantic versioning.
The latest version is available via mavenCentral()
. Just add the following dependency:
compile 'io.card:android-sdk:5.5.1'
You can receive updates about new versions via a few different channels:
Also be sure to check and post to the Stack Overflow card.io tag.
The information in this guide is enough to get started. For additional details, see our javadoc.
(Note: in the past, developers needed to sign up at the card.io site and obtain an app token
. This is no longer required.)
A manual entry fallback mode is provided for devices that do not meet these requirements.
Add the dependency in your build.gradle
:
compile 'io.card:android-sdk:5.5.0'
First, we'll assume that you're going to launch the scanner from a button,and that you've set the button's onClick
handler in the layout XML via android:onClick="onScanPress"
.Then, add the method as:
public void onScanPress(View v) {
Intent scanIntent = new Intent(this, 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
// MY_SCAN_REQUEST_CODE is arbitrary and is only used within this activity.
startActivityForResult(scanIntent, MY_SCAN_REQUEST_CODE);
}
Next, we'll override onActivityResult()
to get the scan result.
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == MY_SCAN_REQUEST_CODE) {
String resultDisplayStr;
if (data != null && data.hasExtra(CardIOActivity.EXTRA_SCAN_RESULT)) {
CreditCard scanResult = data.getParcelableExtra(CardIOActivity.EXTRA_SCAN_RESULT);
// Never log a raw card number. Avoid displaying it, but if necessary use getFormattedCardNumber()
resultDisplayStr = "Card Number: " + scanResult.getRedactedCardNumber() + "\n";
// Do something with the raw number, e.g.:
// myService.setCardNumber( scanResult.cardNumber );
if (scanResult.isExpiryValid()) {
resultDisplayStr += "Expiration Date: " + scanResult.expiryMonth + "/" + scanResult.expiryYear + "\n";
}
if (scanResult.cvv != null) {
// Never log or display a CVV
resultDisplayStr += "CVV has " + scanResult.cvv.length() + " digits.\n";
}
if (scanResult.postalCode != null) {
resultDisplayStr += "Postal Code: " + scanResult.postalCode + "\n";
}
}
else {
resultDisplayStr = "Scan was canceled.";
}
// do something with resultDisplayStr, maybe display it in a textView
// resultTextView.setText(resultDisplayStr);
}
// else handle other activity results
}
aar
package. Anyone not using gradle will need to extract the proguard file and add it to their proguard config.Please read our contributing guidelines prior to submitting a Pull Request.
Please refer to this repo's license file.
现在有好多扫描识别银行卡号的SDK都是收费的,但是也有不收费的,但是有一定的问题,就是那种印刷的银行卡号扫描不出来,希望哪位大神指导原因给解释下,这个不收费的SDK就是card.io-Android-SDK,githubdi地址 使用方式很简单,更多介绍可以看GitHub 使用文档: 首先导入依赖:compile 'io.card:android-sdk:5.5.1' 然后在你需要调用拍照的地方加
# ReadMe ------ v10.10.0 1. 适配Android 11 ,支持通过FileProvider分享。 v10.9.0 1. 修复可能存在的安全问题。 v10.8.0 1. 修复bug. v10.7.0 1. 20年第一个版本,在v9.12.0基础上的升级。 2. 主要解决9.12.0版本中的bug. 3。v4.x.x版本系列之后不再维护,推荐升级。具体接入方式2019SDK目
Eclipse下的Android虚拟机,运行应用,正常的控制台信息Console一般如下01.[2012-02-17 15:01:28 - tmall] ------------------------------ 02.[2012-02-17 15:01:28 - tmall] Android Launch! 03.[2012-02-17 15:01:28 - tmall] adb is run
设置minifyEnabled后,无法生成签名的APk . 设置minifyEnabled时启用false.i没有问题 . 是否必须设置minifyEnabled为true?没有什么问题? 我的ProGuard规则在这里.. -dontwarn com.squareup.picasso.** -dontwarn com.squareup.okhttp.internal.** -dontwarn o
card.io 提供在手机app中快速,简单的扫描信用卡,获取信用卡卡号等。现阶段只支持带凸起的银行卡。提供Android sdk和ios sdk,源码都托管在github上。 card.io SDK for Android https://github.com/card-io/card.io-Android-SDK card.io SDK for iOS https://github.com/c
我有一个Android 0.4.2 Studio的问题,当创建一个新的应用程序时,它告诉我渲染有问题,并显示给我以下问题: 未发现Android SDK的渲染问题。请配置Android SDK。 我的设置SDK和JDK是这样的:Android SDK位置:C:\adt-bundle-windows\SDK,我把我用的路径放在Eclipse SDK里面,或者可能有问题,如果有人发生了什么已经修复了,
There are some steps you must follow before you can build and run any code on your Android device. This is true regardless of whether you use Unity or write Android applications from scratch. 想要你的代码能够
集成前提 SDK导入 标准接口快速集成 基本的事件监听 扩展功能 推送集成 混淆打包注意 版本更新说明
如需集成DeepShare,请参考DeepShare Android集成 1. 导入SDK 你可以用下面的方法进行导入: 方法1. 使用AndroidStudio自动导入 在App的 build.gradle文件中添加 dependencies { implementation 'com.zhuge.analysis:zhugeioanalytics:latest.integration'
手机推流Android SDK文档 目录 如何接入 推流步骤 拉流步骤 错误码说明 添加混淆文件 SDK和Demo下载 如何接入 环境需求: JDK版本1.8 Android SDK API Level ≥ 18 App要求 Android 4.3及以上设备 cpu架构支持 ARM、ARMV7、ARM64 接入步骤: 将yagupusher.aar、yaguplayer.aar全部拖入app目录下