Android – ID Parser SDK

ID Parser SDK – Download

ID Parsing SDK for Android

DL/ID cards are widely used for storing personal information such as first name, last name, birth date, address, hair color, etc. They also contain special information related to driving activity including DL number, class and restrictions. Because of the utility of this data, there is a high demand for mobile applications that can scan and process DL/ID information.

Magnetic Stripe and 2D formats greatly vary from one state to another, causing numerous difficulties when attempting to parse information encoded in each DL. For instance, some cards may contain tracks in the inverted order, while others may use slightly shifted track positions for storing fields.

As a solution, IDScan.net developed a DL/ID Parsing Component for iPhone/iPod. We collected 10+ years of ID formats from the US and Canada and tested each one to ensure every DL/ID card is parsed with precision.

Implementation Instructions Using Android Studio

*all code snippets can be seen in the example project included in the SDK download

The DL parsing component enables DL/ID parsing for Android applications. It consists of the following files:

  • dlparserlib.jar
  • android-support-v4.jar
  • several libidscan_parser.so

Copy dlparser.jar and android-support-v4.jar to the “libs” folder of your project in Android , then add dependencies for ‘com.android.support:support-v4:21.0.3’ and files(‘libs/dlparserlib.jar’) in your application’s build.gradle.

dependencies {
    compile 'com.android.support:support-v4:21.0.3'
    compile files('libs/dlparserlib.jar')
}

Clean your project, then create a “jniLibs” folder under src/main, and copy all folders containing a libidscan_parser.so file to jniLibs.
In the code below, a DLParser() object is initialized and the results are stored in a DLResult object after calling its parse() method:

parser = new DLParser();
    try
    {
        //setup parser.
	parser.setup(getApplicationContext(), _KEY);
	//make parse the data.
	DLResult res = parser.parse(test_data.getBytes("UTF8"));    

To access the parsed information in code, you can access the parsed information field by field:

((TextView)findViewById(R.id.tv_first_name)).setText(res.firstName);
((TextView)findViewById(R.id.tv_last_name)).setText(res.lastName);
((TextView)findViewById(R.id.tv_address)).setText(res.address1);
((TextView)findViewById(R.id.tv_birthdate)).setText(res.birthdate);
((TextView)findViewById(R.id.tv_expiration_date)).setText(res.expirationDate);
...

Obtaining a License Key

To obtain a license key, email your package name to support@781.fdb.myftpupload.com, then copy the received key into the _KEY field when setting up the DLParser() object as in the code above.