card-io / card.io-Android-SDK

card.io provides fast, easy credit card scanning in mobile apps
Other
1.99k stars 535 forks source link

Android SDK scan credit card but does not produce output. #55

Closed muraliandroid closed 9 years ago

muraliandroid commented 9 years ago

I am using card io Android SDK library (version 5.0.0) in Eclipse. The application opens the scan page and it scans the credit card but does not produce output ( showing credit card information). Please see the image URL of the screen short (scanning credit card): http://i.imgur.com/GFV3IKG.png Please help me on find out my mistake. I have tested my application on Samsung S4,Moto E, Sony xperia Z and Samsung S3. My credit card number provider is "ICICI Bank" and number starts with 4.

Note: I have created Android project in Eclipse and please see the following link how I used processor libraries in my project (it may has problem) : http://i.imgur.com/iicjKjm.png

braebot commented 9 years ago

Does the phone vibrate when the card is recognized? If not, the card is not actually scanned. Rather, it is merely highlighting the edges of the card, while card.io attempts to find the number. This is most likely due to the card not having embossed numbers, or not a pattern that we support. Have you had any luck in iOS with the same card?

muraliandroid commented 9 years ago

The mobile phone does not vibrated when scan the credit card. what you mean by pattern here (I assumed its card type supported, listed in the http://card-io.github.io/card.io-Android-SDK/io/card/payment/CardType.html page. am I right?). My credit card is powered by VISA. currently we do not have iOS.

braebot commented 9 years ago

Ok, then card.io is not recognizing the card. I assume it starts with 4? Is the card number 16 digits long? Does card.io scan any other cards in your possession?

muraliandroid commented 9 years ago

Yes, my card starts with 4 and its 16 digits long.

muraliandroid commented 9 years ago

I have checked in iOS with same card. its works but it takes long time to recognize and shows the output and some time does not recognize even if hold for a long time. In Android case it does not work. please help me. Please see my Logcat details for Android: (Tested on Sony Z)

04-01 23:30:31.598: I/card.io(17363): Checking hardware support...
04-01 23:30:31.598: I/card.io(17363): card.io 5.0.0 03/10/2015 11:22:54 -0500
04-01 23:30:31.598: D/dalvikvm(17363): Trying to load lib /data/app-lib/com.ex.creditcardscanner-1/libcardioDecider.so 0x44b46b60
04-01 23:30:31.598: D/dalvikvm(17363): Added shared lib /data/app-lib/com.ex.creditcardscanner-1/libcardioDecider.so 0x44b46b60
04-01 23:30:31.598: D/card.io(17363): Loaded card.io decider library.  nUseNeon():true,nUseTegra():false
04-01 23:30:31.598: D/dalvikvm(17363): Trying to load lib /data/app-lib/com.ex.creditcardscanner-1/libopencv_core.so 0x44b46b60
04-01 23:30:31.598: W/linker(17363): libopencv_core.so has text relocations. This is wasting memory and is a security risk. Please fix.
04-01 23:30:31.618: D/dalvikvm(17363): Added shared lib /data/app-lib/com.ex.creditcardscanner-1/libopencv_core.so 0x44b46b60
04-01 23:30:31.618: D/dalvikvm(17363): No JNI_OnLoad found in /data/app-lib/com.ex.creditcardscanner-1/libopencv_core.so 0x44b46b60, skipping init
04-01 23:30:31.618: D/card.io(17363): Loaded opencv core library
04-01 23:30:31.618: D/dalvikvm(17363): Trying to load lib /data/app-lib/com.ex.creditcardscanner-1/libopencv_imgproc.so 0x44b46b60
04-01 23:30:31.618: W/linker(17363): libopencv_imgproc.so has text relocations. This is wasting memory and is a security risk. Please fix.
04-01 23:30:31.618: D/dalvikvm(17363): Added shared lib /data/app-lib/com.ex.creditcardscanner-1/libopencv_imgproc.so 0x44b46b60
04-01 23:30:31.618: D/dalvikvm(17363): No JNI_OnLoad found in /data/app-lib/com.ex.creditcardscanner-1/libopencv_imgproc.so 0x44b46b60, skipping init
04-01 23:30:31.618: D/card.io(17363): Loaded opencv imgproc library
04-01 23:30:31.618: D/dalvikvm(17363): Trying to load lib /data/app-lib/com.ex.creditcardscanner-1/libcardioRecognizer.so 0x44b46b60
04-01 23:30:31.618: D/dalvikvm(17363): Added shared lib /data/app-lib/com.ex.creditcardscanner-1/libcardioRecognizer.so 0x44b46b60
04-01 23:30:31.618: I/card.io(17363): Loaded card.io NEON library
04-01 23:30:33.119: I/Adreno-EGL(17363): <qeglDrvAPI_eglInitialize:381>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_KK_2.7_RB1.04.04.04.007.064_msm8960_KK_2.7_RB1__release_AU ()
04-01 23:30:33.119: I/Adreno-EGL(17363): OpenGL ES Shader Compiler Version: 17.01.12.SPL
04-01 23:30:33.119: I/Adreno-EGL(17363): Build Date: 07/01/14 Tue
04-01 23:30:33.119: I/Adreno-EGL(17363): Local Branch: 
04-01 23:30:33.119: I/Adreno-EGL(17363): Remote Branch: quic/kk_2.7_rb1.41
04-01 23:30:33.119: I/Adreno-EGL(17363): Local Patches: NONE
04-01 23:30:33.119: I/Adreno-EGL(17363): Reconstruct Branch: AU_LINUX_ANDROID_KK_2.7_RB1.04.04.04.007.064 +  NOTHING
04-01 23:30:33.169: D/OpenGLRenderer(17363): Enabling debug mode 0
04-01 23:30:33.279: I/ActivityManager(17363): Timeline: Activity_idle id: android.os.BinderProxy@44b42ee0 time:26177721
04-01 23:30:34.430: I/ActivityManager(17363): Timeline: Activity_idle id: android.os.BinderProxy@44b42ee0 time:26178877
04-01 23:31:10.766: I/ActivityManager(17363): Timeline: Activity_idle id: android.os.BinderProxy@44b42ee0 time:26215208
04-01 23:31:17.122: I/ActivityManager(17363): Timeline: Activity_idle id: android.os.BinderProxy@44b42ee0 time:26221561
04-01 23:31:22.888: W/IInputConnectionWrapper(17363): showStatusIcon on inactive InputConnection
04-01 23:31:47.602: I/ActivityManager(17363): Timeline: Activity_idle id: android.os.BinderProxy@44b42ee0 time:26252041
04-01 23:31:49.133: I/ActivityManager(17363): Timeline: Activity_launch_request id:com.ex.creditcardscanner time:26253578
04-01 23:31:49.183: I/CardIOActivity(17363): onCreate() ================================================================
04-01 23:31:49.213: I/I18nManager(17363): Checking locale ar
04-01 23:31:49.213: I/I18nManager(17363): Checking locale da
04-01 23:31:49.223: I/I18nManager(17363): Checking locale de
04-01 23:31:49.223: I/I18nManager(17363): Checking locale en
04-01 23:31:49.233: I/I18nManager(17363): Checking locale en_AU
04-01 23:31:49.233: I/I18nManager(17363): Checking locale en_GB
04-01 23:31:49.233: I/I18nManager(17363): Checking locale es
04-01 23:31:49.233: I/I18nManager(17363): Checking locale es_MX
04-01 23:31:49.243: I/I18nManager(17363): Checking locale fr
04-01 23:31:49.243: I/I18nManager(17363): Checking locale he
04-01 23:31:49.243: I/I18nManager(17363): Checking locale is
04-01 23:31:49.243: I/I18nManager(17363): Checking locale it
04-01 23:31:49.243: I/I18nManager(17363): Checking locale ja
04-01 23:31:49.253: I/I18nManager(17363): Checking locale ko
04-01 23:31:49.253: I/I18nManager(17363): Checking locale ms
04-01 23:31:49.253: I/I18nManager(17363): Checking locale nb
04-01 23:31:49.253: I/I18nManager(17363): Checking locale nl
04-01 23:31:49.253: I/I18nManager(17363): Checking locale pl
04-01 23:31:49.263: I/I18nManager(17363): Checking locale pt
04-01 23:31:49.263: I/I18nManager(17363): Checking locale pt_BR
04-01 23:31:49.263: I/I18nManager(17363): Checking locale ru
04-01 23:31:49.263: I/I18nManager(17363): Checking locale sv
04-01 23:31:49.263: I/I18nManager(17363): Checking locale th
04-01 23:31:49.273: I/I18nManager(17363): Checking locale tr
04-01 23:31:49.273: I/I18nManager(17363): Checking locale zh-Hans
04-01 23:31:49.273: I/I18nManager(17363): Checking locale zh-Hant
04-01 23:31:49.273: I/I18nManager(17363): Checking locale zh-Hant_TW
04-01 23:31:49.273: D/I18nManager(17363): setLanguage(null)
04-01 23:31:49.273: D/I18nManager(17363): null not found.  Attempting to look for en_GB
04-01 23:31:49.273: D/I18nManager(17363): setting locale to:en_GB
04-01 23:31:49.273: D/I18nManager(17363): setLanguage(null)
04-01 23:31:49.273: D/I18nManager(17363): null not found.  Attempting to look for en_GB
04-01 23:31:49.273: D/I18nManager(17363): setting locale to:en_GB
04-01 23:31:49.273: V/CardScanner(17363): prepareScanner()
04-01 23:31:49.654: V/CardScanner(17363): camera is connected
04-01 23:31:49.654: D/CardScanner(17363): - parameters: android.hardware.Camera$Parameters@44bf92e8
04-01 23:31:49.694: I/CardIOActivity(17363): onResume() ----------------------------------------------------------
04-01 23:31:49.694: D/MEMORY(17363): Native memory stats: (free/alloc'd/total)89872/5398768/5771264
04-01 23:31:50.184: D/CardIOActivity(17363): restartPreview()
04-01 23:31:50.184: V/CardScanner(17363): resumeScanning(android.view.SurfaceView$4@44c72640)
04-01 23:31:50.184: V/CardScanner(17363): - mCamera:android.hardware.Camera@44bf91b0
04-01 23:31:50.204: V/CardScanner(17363): - preview format: 17
04-01 23:31:50.204: V/CardScanner(17363): - bytes per pixel: 1
04-01 23:31:50.204: V/CardScanner(17363): - buffer size: 921600
04-01 23:31:50.214: D/CardScanner(17363): setFlashOn: false
04-01 23:31:50.244: D/CardScanner(17363): setFlashOn: false
04-01 23:31:50.254: D/Torch(17363): Torch OFF
04-01 23:31:50.264: D/Preview(17363): Preview.onMeasure(w:1073742904, h:1073743600) setMeasuredDimension(w:1080, h:1776)
04-01 23:31:50.284: D/Preview(17363): Preview.onLayout()
04-01 23:31:50.284: D/Preview(17363): - isSurfaceValid: false
04-01 23:31:50.294: D/CardScanner(17363): Preview.surfaceCreated()
04-01 23:31:50.294: D/CardScanner(17363): surfaceFrame: Rect(0, 0 - 1080, 1440)
04-01 23:31:50.364: D/CardScanner(17363): startPreview success
04-01 23:31:50.364: D/CardScanner(17363): Preview.surfaceCreated(), surface is valid
04-01 23:31:50.364: D/CardScanner(17363): Preview.surfaceChanged(holder?:true, f:4, w:1080, h:1440 )
04-01 23:31:50.495: D/Preview(17363): Preview.onMeasure(w:1073742904, h:1073743600) setMeasuredDimension(w:1080, h:1776)
04-01 23:31:50.495: D/Preview(17363): Preview.onLayout()
04-01 23:31:50.495: D/Preview(17363): - isSurfaceValid: false
04-01 23:31:50.545: D/CardScanner(17363): mFirstPreviewFrame
04-01 23:31:50.545: D/CardIOActivity(17363): mFirstPreviewFrame
04-01 23:31:50.545: D/OverlayView(17363): setGuideAndRotation: Rect(58, 584 - 1021, 1191), 0
04-01 23:31:50.555: D/OverlayView(17363): Rect(0, 168 - 1080, 1608), Point(120, 80), Rect(0, 168 - 1080, 1608), Point(120, 80)
04-01 23:31:50.645: I/ActivityManager(17363): Timeline: Activity_idle id: android.os.BinderProxy@44baf428 time:26255086
04-01 23:31:50.665: W/CardScanner(17363): could not trigger auto focus: java.lang.RuntimeException: autoFocus failed
04-01 23:31:50.895: D/Preview(17363): Preview.onMeasure(w:1073742904, h:1073743600) setMeasuredDimension(w:1080, h:1776)
04-01 23:31:50.895: D/Preview(17363): Preview.onLayout()
04-01 23:31:50.895: D/Preview(17363): - isSurfaceValid: false
04-01 23:31:50.975: V/RenderScript(17363): 0x77a44708 Launching thread(s), CPUs 4
04-01 23:33:42.614: I/CardIOActivity(17363): onPause() xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
braebot commented 9 years ago

Have you tried running the included Android tests on this device? I've found that to be a good indication of whether or not the device will quickly pick up the device.

braebot commented 9 years ago

In addition, please keep in mind that card.io can only scan traditional, embossed numbers. As you've seen with Android, not all processors/cameras can successfully detect all cards.

roscrazy commented 9 years ago

hello you all. I faced the same problem. I 've tested on Note 3(Android 4.4) and Nexus 7 running Android 5.0.1. Do you guys have found out how to resolve the problem here ? Please help me.

braebot commented 9 years ago

When you are testing with card.io 5.0.+, did you update all the libs files, in addition to the .jar file? If you're using eclipse, you may have forgotten this step, and the cards will not scan as a result. See https://github.com/paypal/PayPal-Android-SDK/issues/161 for another customer with this issue.

roscrazy commented 9 years ago

hi @braebot ,

Thank for your quick response. But I 've just pulled the latest source last night. At the beginning tested with the sample code here https://github.com/card-io/card.io-Android-SDK (tested with Android studio, have this line in gradle compile 'io.card:android-sdk:5.0.0') , but it did not work then I pulled the libs from https://github.com/card-io/card.io-Android-source then built the sample app. But I got the same problem too. Any suggestion please

muraliandroid commented 9 years ago

Hi, I have tested my sample application again on yesterday , but it never scan my credit cards. I am sure, I have placed library files correctly in libs folder as shown in your Paypal example (only difference is, I have used cardio.jar file which got from extracting ".AAR" file and renamed classes.jar into cardio.jar). Please help me and let me know if your want to see my sample application. Please check out my libs folder created using Eclipse, it may contain problem. http://i.imgur.com/iicjKjm.png

braebot commented 9 years ago

Huh, so some folks are even having problems with the sample app, using Android Studio? If you are still having issues with Android Studio, please share your project on GitHub and I can have a look.

As for the eclipse issue, please ensure you're using the latest .so files, as well as the classes.jar extracted from the .aar file. Beyond that, I'm afraid we're going to have to rely on the community for eclipse support, as we only use Android Studio and Gradle.

roscrazy commented 9 years ago

hi @braebot ,

Here is the project as your request : https://github.com/roscrazy/TemporaryCard.ioSample I only downloaded your sample project and trying to test it. I tested the card with iOS and it can read. But for Android, there are no signal ... Please help me take a look. And could you kindly send me an APK which can read your cards. Then, I can test with my cards. Sincerely.

braebot commented 9 years ago

@roscrazy, the project you shared does indeed scan my card when I install the app (after adding the necessary gradle/ directory contents). It could be your device that is not supported. Can you paste some logs? What is the behavior you notice?

roscrazy commented 9 years ago

hi @braebot ,

So sorry, I got the app working now. I tested with the other cards, and it work (but It take long time to recognize). Maybe because my device's camera and the card( the card that I mention before) does not work well together. Thank you very much for your supporting.

maha1010 commented 8 years ago

am using card.io to scan credit and debit cards.scanning screen opens but not producing result even my device not vibrate

pravin-mindstix commented 8 years ago

@maha1010 : are you scanning embossed card? I am not sure but, AFAIK we can scan only embossed cards using card.io.

maha1010 commented 8 years ago

can any one guide me to scan all debit and credit cards please

MinaMedhatKamel commented 8 years ago

I have the same problem , did anyone solve it ?

rdonik commented 6 years ago

hey! Did anyone solve this problem?