Android: How to read Magnetic Stripe(credit cards, etc) Data

Hyangelo picture Hyangelo · Oct 24, 2011 · Viewed 40.4k times · Source

The actual app is actually a web app but since my first impression is that there is no way to do this with a normal (android) web browser right now, I figured this might be possible with a WebView.

Are there card reader attachments out there that have APIs/SDKs for android?

Answer

Hyangelo picture Hyangelo · Oct 24, 2011

We have found a viable solution. MagTek offers a device that is similar with the one being used by SquareUp. The device is slightly larger and heavier but they offer SDKs for Android, iOS and Windows Phones. The android SDK can be found and downloaded here:

http://www.magtek.com/support/software/programming_tools/

look for SCRA SDK

You can also contact them directly as our company did so they can provide you the latest SDKs.


Update:

Also tried idtech's UniMag mobile card reader:

http://www.idtechproducts.com/products/mobile-readers/112.html

I tested this on a Samsung Galaxy Tab 10.1" running Android 3.1. Works as advertised.

Update 2: Our app that uses this can now be found on the android store(but it isn't really useful to anyone else aside from our enterprise customers). Essentially, the app is a native wrapper application with a WebView and the communication between webapp and wrapper is abstracted and performed using javascript. In theory, anyone can use your wrapper with their webapp as long as the webapp knows the API however I am not permitted to release the API nor any specific implementation details. I suppose if anyone is interested, a good 'ol decompiler will reveal the implementation.