在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):faceterteam/PayCards_Android开源软件地址(OpenSource Url):https://github.com/faceterteam/PayCards_Android开源编程语言(OpenSource Language):C++ 87.4%开源软件介绍(OpenSource Introduction):PAY.CARDS RECOGNIZERAutomatic recognition of bank card data using built-in camera on Android devices. See live demo: pay.cards Installation
UsageBuild an Intent using the static final int REQUEST_CODE_SCAN_CARD = 1;
...
private void scanCard() {
Intent intent = new ScanCardIntent.Builder(this).build();
startActivityForResult(intent, REQUEST_CODE_SCAN_CARD);
} Handle the result: @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_CODE_SCAN_CARD) {
if (resultCode == Activity.RESULT_OK) {
Card card = data.getParcelableExtra(ScanCardIntent.RESULT_PAYCARDS_CARD);
String cardData = "Card number: " + card.getCardNumberRedacted() + "\n"
+ "Card holder: " + card.getCardHolderName() + "\n"
+ "Card expiration date: " + card.getExpirationDate();
Log.i(TAG, "Card info: " + cardData);
} else if (resultCode == Activity.RESULT_CANCELED) {
Log.i(TAG, "Scan canceled");
} else {
Log.i(TAG, "Scan failed");
}
}
} License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论