{"id":13848553,"url":"https://github.com/card-io/card.io-Android-SDK","last_synced_at":"2025-07-12T13:31:37.538Z","repository":{"id":8903722,"uuid":"10626798","full_name":"card-io/card.io-Android-SDK","owner":"card-io","description":"card.io provides fast, easy credit card scanning in mobile apps","archived":true,"fork":false,"pushed_at":"2017-03-17T19:04:47.000Z","size":131111,"stargazers_count":1989,"open_issues_count":67,"forks_count":532,"subscribers_count":178,"default_branch":"master","last_synced_at":"2024-09-26T23:00:20.600Z","etag":null,"topics":["android","card-scanning","credit-card","ocr","sdk"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/card-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-11T17:27:45.000Z","updated_at":"2024-09-21T13:21:08.000Z","dependencies_parsed_at":"2022-07-13T10:30:35.804Z","dependency_job_id":null,"html_url":"https://github.com/card-io/card.io-Android-SDK","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/card-io%2Fcard.io-Android-SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/card-io%2Fcard.io-Android-SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/card-io%2Fcard.io-Android-SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/card-io%2Fcard.io-Android-SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/card-io","download_url":"https://codeload.github.com/card-io/card.io-Android-SDK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225825266,"owners_count":17529905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","card-scanning","credit-card","ocr","sdk"],"created_at":"2024-08-04T19:00:52.028Z","updated_at":"2024-11-22T00:30:40.490Z","avatar_url":"https://github.com/card-io.png","language":"Java","funding_links":[],"categories":["Java","Libs","SDK"],"sub_categories":["\u003cA NAME=\"SDK\"\u003e\u003c/A\u003eSDK"],"readme":"[![Build Status](https://travis-ci.org/card-io/card.io-Android-SDK.svg)](https://travis-ci.org/card-io/card.io-Android-SDK)\n\ncard.io SDK for Android\n========================\n\n[card.io](https://www.card.io/) provides fast, easy credit card scanning in mobile apps.\n\nStay up to date\n---------------\n\nPlease be sure to keep your app up to date with the latest version of the SDK.\nAll releases follow [semantic versioning](http://semver.org/).\n\nThe latest version is available via `mavenCentral()`.  Just add the following dependency:\n\n```\ncompile 'io.card:android-sdk:5.5.1'\n```\n\nYou can receive updates about new versions via a few different channels:\n\n* Follow [@cardio](https://twitter.com/cardio) (also great to send us feedback)\n* Subscribe to our [card-io-sdk-announce](https://groups.google.com/forum/#!forum/card-io-sdk-announce) list.\n* \"Watch\" this GitHub repository\n\nAlso be sure to check and post to the [Stack Overflow card.io tag](http://stackoverflow.com/questions/tagged/card.io).\n\nIntegration instructions\n------------------------\n\nThe information in this guide is enough to get started. For additional details, see our **[javadoc](http://card-io.github.io/card.io-Android-SDK/)**.\n\n*(Note: in the past, developers needed to sign up at the [card.io site](https://www.card.io) and obtain an* `app token`. *This is no longer required.)*\n\n### Requirements for card scanning\n\n*   Rear-facing camera.\n*   Android SDK version 16 (Android 4.1) or later.\n*   armeabi-v7a, arm64-v8, x86, or x86_64 processor.\n\nA manual entry fallback mode is provided for devices that do not meet these requirements.\n\n### Setup\n\nAdd the dependency in your `build.gradle`:\n\n```\ncompile 'io.card:android-sdk:5.5.0'\n```\n\n### Sample code  (See the SampleApp for an example)\n\nFirst, we'll assume that you're going to launch the scanner from a button,\nand that you've set the button's `onClick` handler in the layout XML via `android:onClick=\"onScanPress\"`.\nThen, add the method as:\n\n```java\npublic void onScanPress(View v) {\n    Intent scanIntent = new Intent(this, CardIOActivity.class);\n\n    // customize these values to suit your needs.\n    scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true); // default: false\n    scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, false); // default: false\n    scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, false); // default: false\n\n    // MY_SCAN_REQUEST_CODE is arbitrary and is only used within this activity.\n    startActivityForResult(scanIntent, MY_SCAN_REQUEST_CODE);\n}\n```\n\nNext, we'll override `onActivityResult()` to get the scan result.\n\n```java\n@Override\nprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n    super.onActivityResult(requestCode, resultCode, data);\n\n    if (requestCode == MY_SCAN_REQUEST_CODE) {\n        String resultDisplayStr;\n        if (data != null \u0026\u0026 data.hasExtra(CardIOActivity.EXTRA_SCAN_RESULT)) {\n            CreditCard scanResult = data.getParcelableExtra(CardIOActivity.EXTRA_SCAN_RESULT);\n\n            // Never log a raw card number. Avoid displaying it, but if necessary use getFormattedCardNumber()\n            resultDisplayStr = \"Card Number: \" + scanResult.getRedactedCardNumber() + \"\\n\";\n\n            // Do something with the raw number, e.g.:\n            // myService.setCardNumber( scanResult.cardNumber );\n\n            if (scanResult.isExpiryValid()) {\n                resultDisplayStr += \"Expiration Date: \" + scanResult.expiryMonth + \"/\" + scanResult.expiryYear + \"\\n\";\n            }\n\n            if (scanResult.cvv != null) {\n                // Never log or display a CVV\n                resultDisplayStr += \"CVV has \" + scanResult.cvv.length() + \" digits.\\n\";\n            }\n\n            if (scanResult.postalCode != null) {\n                resultDisplayStr += \"Postal Code: \" + scanResult.postalCode + \"\\n\";\n            }\n        }\n        else {\n            resultDisplayStr = \"Scan was canceled.\";\n        }\n        // do something with resultDisplayStr, maybe display it in a textView\n        // resultTextView.setText(resultDisplayStr);\n    }\n    // else handle other activity results\n}\n```\n\n### Hints \u0026amp; Tips\n\n* [Javadocs](http://card-io.github.io/card.io-Android-SDK/) are provided in this repo for a complete reference.\n* Note: the correct proguard file is automatically imported into your gradle project from the `aar` package.  Anyone not using gradle will need to extract the proguard file and add it to their proguard config.\n* card.io errors and warnings will be logged to the \"card.io\" tag.\n* If upgrading the card.io SDK, first remove all card.io libraries so that you don't accidentally ship obsolete or unnecessary libraries. The bundled libraries may change.\n* Processing images can be memory intensive.\n    * [Memory Analysis for Android Applications](http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html) provides some useful information about how to track and reduce your app's memory useage.\n* card.io recommends the use of [SSL pinning](http://blog.thoughtcrime.org/authenticity-is-broken-in-ssl-but-your-app-ha) when transmitting sensitive information to protect against man-in-the-middle attacks.\n\nContributing\n------------\n\nPlease read our [contributing guidelines](CONTRIBUTING.md) prior to submitting a Pull Request.\n\nLicense\n-------\n\nPlease refer to this repo's [license file](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcard-io%2Fcard.io-Android-SDK","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcard-io%2Fcard.io-Android-SDK","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcard-io%2Fcard.io-Android-SDK/lists"}