Code Monkey home page Code Monkey logo

card.io-android-source's Introduction

Build Status

card.io logo

Credit card scanning for Android apps

This repository contains everything needed to build the card.io library for Android.

What it does not yet contain is much in the way of documentation. ๐Ÿ˜ฟ So please feel free to ask any questions by creating github issues -- we'll gradually build our documentation based on the discussions there.

Note that this is actual production code, which has been iterated upon by multiple developers over several years. If you see something that could benefit from being tidied up, rewritten, or otherwise improved, your Pull Requests will be welcome! See CONTRIBUTING.md for details.

Brought to you by PayPal logo

Using card.io

If you merely wish to incorporate card.io within your Android app, simply download the latest official release from https://github.com/card-io/card.io-Android-SDK. That repository includes complete integration instructions and sample code.

Dev Setup

Prerequisites

  • Current version of the Android SDK. (obviously)
  • Android NDK. We've tested with r10e. At minimum, the Clang toolchain is required.

First build

There are a few bugs in the build process, so these steps are required for the first build:

  1. clone this repo
  2. $ cd card.io-Android-source
  3. init its dmz submodule: git submodule sync; git submodule update --init --recursive
  4. $ cp local.properties.example local.properties
  5. Edit local.properties with your env (Assuming you've defined $ANDROID_NDK correctly, run $ echo "$ANDROID_NDK" "$ANDROID_SDK"
  6. $ ./gradlew clean assembleDebug

Hints & tricks.

Testing

Running

  1. Connect an Android 18 (or better) device.
  2. $ ./gradlew connectedAndroidTest

You should see the app open and run through some tests.

Un-official Release

$ ./gradlew clean :card.io:assembleRelease Cleans and builds an aar file for distribution.

The official release process is described separately.

Contributors

card.io was created by Josh Bleecher Snyder.

Subsequent help has come from Brent Fitzgerald, Tom Whipple, Dave Goldman, Jeff Brateman, Roman Punskyy, Matt Jacunski, Dan Nizri, and Zach Sweigart.

And from you! Pull requests and new issues are welcome. See CONTRIBUTING.md for details.

card.io-android-source's People

Contributors

aermetici avatar alex-schwartzman avatar an-rahulpandey avatar braebot avatar chrisplus avatar dsn5ft avatar esong avatar lkorth avatar m-schmoock avatar ph0b avatar sandromachado avatar sankarbhavanib avatar thorbenprimke avatar tomwhipple avatar vivekkiran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

card.io-android-source's Issues

Supporting country specific cards (Brazil - ELO / Hipercard)

THIS IS A QUESTION, NOT AN ISSUE

I'm using CardIO it on a project in Brazil and here we have some non-international credit cards (such as ELO and HIPERCARD, only available here in Brazil) which are not recognized by default. I made a fork of card.io-Android-source and it was not hard to add support for them.

I was planning to submit a PR with those changes, however, as these cards are supported only in Brazil, some of their BIN codes conflict with other cards (for instance, a Diners starts with 38, whereas an HIPERCARD starts with 3841.. Visa cards start with 4, whereas some ELO cards starts with 401178 / 40119 / 431274 / 438935 / 451416 / 457393 / 457631 / 457632 and so on). Thus, as I didn't find any "interval conflicts" on intervalLookup (CardType.java), I don't think it is safe to submit these kind of modifications.

That being said, my question is: Do you have any way to support these country-specific cards that I missed? If not, are you planning to have some CardIO version where these kind of cards are supported?

Execution build: card.io-Android-source/card.io/src/main/obj/local/armeabi-v7a/objs/cardioRecognizer_tegra2/card.io-dmz/dmz_all.o] Error 1

I have followed your steps in first build, but when I executed, I got these error:

/var/folders/fy/2_ssmh6d7fqb96jqx_hy8c5w0000gp/T/dmz_all-18fe4c.s: Assembler messages:
/var/folders/fy/2_ssmh6d7fqb96jqx_hy8c5w0000gp/T/dmz_all-18fe4c.s:38966: Error: r13 not allowed here -- sub.w sp,r2,#832' /var/folders/fy/2_ssmh6d7fqb96jqx_hy8c5w0000gp/T/dmz_all-18fe4c.s:41459: Error: r13 not allowed here --sub.w sp,r2,#1296'
/var/folders/fy/2_ssmh6d7fqb96jqx_hy8c5w0000gp/T/dmz_all-18fe4c.s:41573: Error: r13 not allowed here -- sub.w sp,r2,#144' clang++: error: assembler command failed with exit code 1 (use -v to see invocation) make: *** [/Users/budi/Documents/card.io-Android-source/card.io/src/main/obj/local/armeabi-v7a/objs/cardioRecognizer_tegra2/card.io-dmz/dmz_all.o] Error 1 make: *** Waiting for unfinished jobs.... /var/folders/fy/2_ssmh6d7fqb96jqx_hy8c5w0000gp/T/dmz_all-4cd441.s: Assembler messages: /var/folders/fy/2_ssmh6d7fqb96jqx_hy8c5w0000gp/T/dmz_all-4cd441.s:65504: Error: r13 not allowed here --sub.w sp,r2,#832'
/var/folders/fy/2_ssmh6d7fqb96jqx_hy8c5w0000gp/T/dmz_all-4cd441.s:71284: Error: r13 not allowed here -- sub.w sp,r2,#1296' /var/folders/fy/2_ssmh6d7fqb96jqx_hy8c5w0000gp/T/dmz_all-4cd441.s:71398: Error: r13 not allowed here --sub.w sp,r2,#144'
/var/folders/fy/2_ssmh6d7fqb96jqx_hy8c5w0000gp/T/dmz_all-4cd441.s:91752: Error: r13 not allowed here -- sub.w sp,r2,#720' /var/folders/fy/2_ssmh6d7fqb96jqx_hy8c5w0000gp/T/dmz_all-4cd441.s:97277: Error: r13 not allowed here --sub.w sp,r2,#496'
/var/folders/fy/2_ssmh6d7fqb96jqx_hy8c5w0000gp/T/dmz_all-4cd441.s:97391: Error: r13 not allowed here -- `sub.w sp,r2,#720'
clang++: error: assembler command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/budi/Documents/card.io-Android-source/card.io/src/main/obj/local/armeabi-v7a/objs/cardioRecognizer/card.io-dmz/dmz_all.o] Error 1
:card.io:buildNative FAILED
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':card.io:buildNative'.

    Process 'command '/Users/budi/Documents/android-sdk-macosx/ndk-bundle/ndk-build'' finished with non-zero exit value 2

The error occurred when I used latest Android SDK, before I updated Android SDK, the error did not occur.
what should i do to fix the error? Thank you so much for your help.

Test App failing tests

Hi everyone,
I cloned this repo via github and followed the instructions to compile.
When I launch "./gradlew connectedAndroidTest" I've got two test failing (stack trace attached).
Is it normal? I'm asking this because I modified the library a bit and it's not properly working, so I would like to understand what's exactly happening :)

I'm using the last revision on this repo, with ndk r10e and the latest android sdk/tools.
I'm testing on a Huawey Ascend Y300 (neon architecture, if I'm right).

PS.
I also own a OnePlus One and a nexus 6p but on both of them I couldn't manage to run the test demo

Many thanks to anyone helping!

stack_trace.txt

schermata 2016-04-13 alle 18 57 59

Import card.io source code as a modul in Android studio project

I've downloaded the card.io source code and i wish to implement it as a new Android-Library module in my project.

Did all the steps to build the project and then im getting this error:

Error:(24, 0) Could not find property 'plugin' on com.android.build.gradle.LibraryExtension_Decorated@4a00927b.

I only have this error when trying to add as module.

execution failed for task ':card..io:buildNative'

hey, i just add card.io SDK to my project, have no problem when build the apps
but i want to custom the card.io layout and navigation, so I download the "card.io-Android-srouce" project, but when I'm building the gradle, it shows an error

capture

I've change sdk and ndk dir to the right place
I run it on windows 8.1
I've tried it with "ndk-build.cmd" (because some says windows can't use ndk-build"), and error like this

capture3

and I've tried to clone the repo and follow the instruction, at step "$ ./gradlew clean assembleDebug
" it shows error like this

capture2

anyone can help me? I'm a bit new android studio user :)

How to override keyboard button onclick

I would like to get back to the previous activity when I click on the "Keyboard..." button. is there a helper method to do so or at least a flag to show/hide this button.

I ask this because I want to use the gradle dependency not to compile from source.
Thanks.

canReadCardWithCamera returns false on Nexus 7(Marshmallow) but works on Lollipop

The CardScanner is not working on my NEXUS 7(Marshmallow). But this is working fine in Lollipop. Does anyone know the reason.

I am using the compile 'io.card:android-sdk:5.3.4' in my app gradle.

This is where i check canReadCardWithCamera.
protected void onResume() {
super.onResume();

    if (CardIOActivity.canReadCardWithCamera()) {
        scanButton.setText("Scan a credit card");
    } else {
        scanButton.setText("Enter credit card information");
    }
}

I guess the runtime permissions are the reason for this issue. But i have manually enabled the camera permission from my app's settings.

Does anyone know a solution for this. Please help.

Android M Permission

Hi, is Card.io updated to handle Android M's runtime permission model?

Thanks.

ndk-build problem

when I try to build it I get the problem Execution failed for task ':card.io:buildNative'.

Process 'command '//ndk-bundle/ndk-build'' finished with non-zero exit value 2

no such ctrl error message from OV5642 camera driver

When the card-io connects to the camera I get a device Error message on the minicom terminal

OV5642 1-003c: ov5642_g_ctrl: no such ctrl 0x8000067

What does this message mean? what could be going wrong?

I am running my application on Samsung Exynos MV4412 test board, with Android v4.0.3, Kernel v3.0.15.

I see the camera display after the application connects to it, it shows a green overlay area where to place the card, but it doesn't seem to automatically recognize and scan the card.

How to use/setting for non creditcard?

Anyone know how to setting for non credit card in Android source?
In iOS source using CardIODetectionModeCardImageOnly for non credit card mode.

Thanks

No rule to make target '.../processor_support.cpp'

My first experience in NDK. I made everything by instructions, also I commented everything in build.gradle for cardio below Javadocs. After starting command './gradlew build' I encountered error(description below). Can you give me advice of how can I build project?
./gradlew build
:card.io:compileLint
:card.io:copyDebugLint UP-TO-DATE
:card.io:mergeDebugProguardFiles UP-TO-DATE
:card.io:buildNative
make: Entering directory /Users/nikitafeshchun/Downloads/card.io-Android-source-master/card.io/src/main/jni' make: *** No rule to make target/Users/nikitafeshchun/Downloads/card.io-Android-source-master/card.io/src/main/jni/card.io-dmz/processor_support.cpp', needed by /Users/nikitafeshchun/Downloads/card.io-Android-source-master/card.io/src/main/obj/local/arm64-v8a/objs/cardioDecider/card.io-dmz/processor_support.o'. Stop. make: *** Waiting for unfinished jobs.... make: Leaving directory/Users/nikitafeshchun/Downloads/card.io-Android-source-master/card.io/src/main/jni'
:card.io:buildNative FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':card.io:buildNative'.

    Process 'command '/usr/local/Cellar/android-ndk/r10d/ndk-build'' finished with non-zero exit value 2

Customize ActionBar and status bar

See card-io/card.io-Android-SDK#40.

iOS has some properties:

/// If YES, the status bar's style will be kept as whatever your app has set it to.
/// If NO, the status bar style will be set to the default style.
/// Defaults to NO.
@Property(nonatomic, assign, readwrite) BOOL keepStatusBarStyle;
/// The default appearance of the navigation bar is navigationBarStyle == UIBarStyleDefault;
/// tintColor == nil (pre-iOS 7), barTintColor == nil (iOS 7).
/// Set either or both of these properties if you want to override these defaults.
/// @see navigationBarTintColor
@Property(nonatomic, assign, readwrite) UIBarStyle navigationBarStyle;
/// The default appearance of the navigation bar is navigationBarStyle == UIBarStyleDefault;
/// tintColor == nil (pre-iOS 7), barTintColor == nil (iOS 7).
/// Set either or both of these properties if you want to override these defaults.
/// @see navigationBarStyle
@Property(nonatomic, retain, readwrite) UIColor *navigationBarTintColor;

NPE using provided Snippet on Android 6

I'm using CardIO 5.1.2 and find an NPE when using the onActivityResult snippet provided on the README

I manually disable the camera permission on Android 6, and then attempt to scan a card using:

                final Resources resources = context.getResources();
                scanIntent.putExtra(CardIOActivity.EXTRA_SCAN_EXPIRY, true);
                scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true);
                scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, true);
                scanIntent.putExtra(CardIOActivity.EXTRA_SUPPRESS_CONFIRMATION, true);
                scanIntent.putExtra(CardIOActivity.EXTRA_HIDE_CARDIO_LOGO, true);
                scanIntent.putExtra(CardIOActivity.EXTRA_SUPPRESS_MANUAL_ENTRY, true);
                scanIntent.putExtra(CardIOActivity.EXTRA_SCAN_INSTRUCTIONS, resources.getString(R.string.cardio_instructions));
                scanIntent.putExtra(CardIOActivity.EXTRA_GUIDE_COLOR,
                        resources.getColor(R.color.color_primary));

                // MY_SCAN_REQUEST_CODE is arbitrary and is only used within this activity.
                startActivityForResult(scanIntent, MY_SCAN_REQUEST_CODE);

Once the dialog appears requesting permissions, I deny it.

onActivityResult gets called with resultCode 13274388, data.hasExtra(CardIOActivity.EXTRA_SCAN_RESULT) returns true, however, the extra is null, so all accesses to the CreditCard object end with an NPE.

Either the snippet should be updated, or CardIO should not set the extra at all.

java.lang.NullPointerException: Attempt to read from field 'int android.graphics.Rect.top' on a null object reference

I recently received this crash report from a Nexus 5X running the card.io 5.3.0 android SDK.

the crash occurs because mGuideFrame is null when dereferencing the top property below.

I haven't dug in further to determine why mCardScanner.getGuideFrame is returning null.

        mGuideFrame = mCardScanner.getGuideFrame(sv.getWidth(), sv.getHeight());

        // adjust for surface view y offset
        mGuideFrame.top += sv.getTop();
        mGuideFrame.bottom += sv.getTop();
        mOverlay.setGuideAndRotation(mGuideFrame, degrees);
        mLastDegrees = degrees;

Change meassures

If i would like to scan a different thing and use different meassures, would the object recognizer work?, What do I need to adjust?

File example.keystore does not exist

Thank braebot, i updated project and previous issue was fix, but i get this message:

  • What went wrong:
    A problem was found with the configuration of task ':SampleApp:packageRelease'.

    File '/media/hungnguyendata/eProtea/Projects/temp/card.io-Android-source/SampleApp/example.keystore' specified for property 'signingConfig.storeFile' does not exist.

How do i define this file to complete build. Thank you!

Customizing DataEntryActivity

I would like to build my own DataEntryActivity for an app, but would still like to keep markedCardImage on the new Activity. Could you possibly make it public or provide a get method for the Image?

Reboots phone

There is no other error codes seen in logs. It just reboot after taking the CC. At first I thought that it just blackout because its processing the card, but it actually reboot my phone. I just copy and paste everything from example.

Extract Name on Card

Any chance to extract the name on card as well when extracting the card number and expiry date?

SampleApp never return from scanner

I tried with the SampleApp and with a new porject that refernce the card.io library.
Whenever I try to scan a credit card, with the green square filled on all sides, the SampleApp do nothing. It remain in scan activity an necer return a result.
The same thing on a new project created by me.

11-19 16:53:47.655 19975-19975/org.my.scanExample.debug I/CardIOActivity: onCreate()
11-19 16:53:47.668 19975-19975/org.my.scanExample.debug V/CardScanner: prepareScanner()
11-19 16:53:47.774 19975-19975/org.my.scanExample.debug V/CardScanner: camera is connected
11-19 16:53:47.775 19975-19975/org.my.scanExample.debug D/CardScanner: - parameters: android.hardware.Camera$Parameters@e42eac1
11-19 16:53:47.786 19975-19975/org.my.scanExample.debug I/CardIOActivity: onResume()
11-19 16:53:47.790 19975-19975/org.my.scanExample.debug D/CardIOActivity: restartPreview()
11-19 16:53:47.790 19975-19975/org.my.scanExample.debug V/CardScanner: resumeScanning(android.view.SurfaceView$4@f6de54)
11-19 16:53:47.790 19975-19975/org.my.scanExample.debug V/CardScanner: - mCamera:android.hardware.Camera@9d271fd
11-19 16:53:47.791 19975-19975/org.my.scanExample.debug V/CardScanner: - preview format: 17
11-19 16:53:47.791 19975-19975/org.my.scanExample.debug V/CardScanner: - bytes per pixel: 1
11-19 16:53:47.791 19975-19975/org.my.scanExample.debug V/CardScanner: - buffer size: 921600
11-19 16:53:47.799 19975-19975/org.my.scanExample.debug D/CardScanner: setFlashOn: false
11-19 16:53:47.801 19975-19975/org.my.scanExample.debug D/CardScanner: setFlashOn: false
11-19 16:53:47.859 19975-19975/org.my.scanExample.debug D/CardScanner: Preview.surfaceCreated()
11-19 16:53:47.859 19975-19975/org.my.scanExample.debug D/CardScanner: surfaceFrame: Rect(0, 0 - 1080, 1440)
11-19 16:53:47.882 19975-19975/org.my.scanExample.debug D/CardScanner: startPreview success
11-19 16:53:47.882 19975-19975/org.my.scanExample.debug D/CardScanner: Preview.surfaceCreated(), surface is valid
11-19 16:53:47.882 19975-19975/org.my.scanExample.debug D/CardScanner: Preview.surfaceChanged(holder?:true, f:4, w:1080, h:1440 )
11-19 16:53:48.182 840-865/? I/ActivityManager: Displayed org.my.scanExample.debug/io.card.payment.CardIOActivity: +542ms
11-19 16:53:48.476 19975-19975/org.my.scanExample.debug D/CardScanner: mFirstPreviewFrame
11-19 16:53:48.476 19975-19975/org.my.scanExample.debug D/CardIOActivity: onFirstFrame(1)
11-19 16:54:00.777 19975-19975/org.my.scanExample.debug D/CardIOActivity: onBackPressed()
11-19 16:54:00.780 19975-19975/org.my.scanExample.debug I/CardIOActivity: onPause()

I tried on API level 21, 22 and 23, with a LG G3, galaxy S5 and a Nexus5 with different real card and also images from web like this: http://www.aarppatientloans.com/_/rsrc/1302071899614/home/visa.png

Any advice?

Did you lost processor_support.cpp ?

In Android.mk:
Line 11:
LOCAL_DMZ_DIR := card.io-dmz

Line 86:
LOCAL_SRC_FILES := $(LOCAL_DMZ_DIR)/processor_support.cpp nativeDecider.cpp

But I find the 'card.io-dmz' directory is empty

use as a view embedded in the activity

not sure if this question has been asked or not, but I feel it would be much better if we could use a view/fragment for card scanning, instead of a separate activity as it currently is

ArrayIndexOutOfBoundsException on CardIOActivity.onRequestPermissionsResult

Hello,
I'm getting the following error on client device:

Caused by: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 at io.card.payment.CardIOActivity.onRequestPermissionsResult(Unknown Source) at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:6728) at android.app.Activity.dispatchActivityResult(Activity.java:6606) at android.app.ActivityThread.deliverResults(ActivityThread.java:3748) ... 9 more

Unfortunately I can't reproduce this error on my devices. But accoding google example grantResults array can be empty.

Execution failed for task ':card.io:buildNative'

I downloaded cardio source and config follow First build guide. But when i run './gradlew build', i got message like:

FAILURE: Build failed with an exception.

Where: Build file '/media/hungnguyendata/eProtea/Projects/temp/card.io-Android-source/card.io/build.gradle' line: 163

What went wrong: A problem occurred configuring project ':SampleApp'.

A problem occurred configuring project ':card.io'. No such property: sonatypeUsername for class: org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer
After that, i create gradle.properties file for define property sonatypeUsername. Like this: "sonatypeUsername=sonatypeUsername sonatypePassword=sonatypePassword". I got this message:

:card.io:buildNative make: Entering directory /Projects/temp/card.io-Android-source/card.io/src/main/jni'
make: *** No rule to make target/Projects/temp/card.io-Android-source/card.io/src/main/jni/card.io-dmz/processor_support.cpp', needed by /Projects/temp/card.io-Android-source/card.io/src/main/obj/local/arm64-v8a/objs/cardioDecider/card.io-dmz/processor_support.o'. Stop.
make: *** Waiting for unfinished jobs....
make: Leaving directory/Projects/temp/card.io-Android-source/card.io/src/main/jni' :card.io:buildNative FAILED

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':card.io:buildNative'.
Process 'command '/home/hungnguyen/applications/android-ndk-r10d/ndk-build'' finished with non-zero exit value 2
what should i do to build project. Thanks so much!

Problems using Gradle 2.4

If the project uses Gradle 2.4 version, we can not use plugin 1.0.1 version and we are not able to integrate the source code with our project.

How to fix this?

Expiration date hint color

Hello

On my device, the hint color for the expiration date ("MM/AA") is white on a white background, could you change it into a dark color such as black ?

Manual entry does not deliver correct result

I'm seeing an incorrect resultCode and data returned to onActivityResult when using manual entry on Marshmallow 6.0 with card.io 5.1.1.

First I start the intent.

Intent scanIntent = new Intent(this, CardIOActivity.class);
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true);
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, true);
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, true);
scanIntent.putExtra(CardIOActivity.EXTRA_USE_PAYPAL_ACTIONBAR_ICON, false);
scanIntent.putExtra(CardIOActivity.EXTRA_HIDE_CARDIO_LOGO, true);
startActivityForResult(scanIntent, 111);

When prompted for permission to use the camera, I deny.

screenshot_20151026-180412

Then I use manual entry to enter the credit card details. After hitting done, onActivityResult returns to my original activity with data equal to null and an unexpected resultCode.

Looking closer at the CardIOActivity code, it looks onActivityResult is being called multiple times with multiple results after the manual entry is finished. In my case, the correct result is delivered to CardIOActivity with the second call to CardIOActivity.onActivityResult. However, the first (incorrect) result is used because CardIOActivity already called setResultAndFinish with the first result it received.

It looks like onActivityResult is trying to guard the finish based on the resultCode, but in my case, manualEntryFallbackOrForced is true, which causes the incorrect result to be delivered:

if (resultCode == RESULT_CARD_INFO || resultCode == RESULT_ENTRY_CANCELED || manualEntryFallbackOrForced) {
   setResultAndFinish(resultCode, data);
}

Using Front Camera

Hi,

I want to use front camera for scanning. I have read this -
card-io/card.io-Android-SDK#1

So it is possible to use it, can someone tell me what changes I have to do in source files to get the final build files with front camera enabled.

How do I enable scanner activity

I made false for all the flags like below

But still scanner activity is not opened,
Suggest me what I can do for that.

 scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true); // default: false
    scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, true); // default: false
    scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, true); // default: false
    scanIntent.putExtra(CardIOActivity.EXTRA_RESTRICT_POSTAL_CODE_TO_NUMERIC_ONLY, true); // default: false
    scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CARDHOLDER_NAME, true); // default: false

    // hides the manual entry button
    // if set, developers should provide their own manual entry mechanism in the app
    scanIntent.putExtra(CardIOActivity.EXTRA_SUPPRESS_MANUAL_ENTRY, false); // default: false

    // matches the theme of your application
    scanIntent.putExtra(CardIOActivity.EXTRA_KEEP_APPLICATION_THEME, true); // default: false

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.