Select where you would like to search:
- Search Store
- Search Site
Android – PDF417 Camera Scanner & Web Parser
Scanner & Web Parser SDK – Download
Implementation Instructions Using Android Studio
*all code snippets can be seen in the example project included in the SDK download
To only integrate the scanner component, ignore step 2. To only integrate the web API component, ignore step 1.
1. With your project open in Android Studio, go to File -> New -> New Module. Select “Import JAR/AAR” and select file path to PDF417Scanner.aar.
2. Copy idscan_android_lib.jar to your libs folder and add dependencies in your app’s build.gradle for “:PDF417Scanner” and com.android.support:appcompat-v7 as well as any additional dependencies you may need:
dependencies { compile 'com.android.support:appcompat-v7:23.0.1' compile project(':PDF417Scanner') compile 'com.android.support:design:23.0.1' compile files('libs/idscan_android_lib.jar') ... ... }
3. Add the following lines to your AndroidManifest.xml:
permission.CAMERA”/>
hardware.camera.autofocus”/>
hardware.camera”/>
4. To start your scan, start PDF417ScanActivity as follows:
To obtain a license key, please email your application’s package name to support@idscan.net. Copy the received key to i.putExtra(PDF417ScanActivity.EXTRA_LICENSE_KEY, _key);
in the above screenshot.
5. onActivityResult will be called once PDF417ScanActivity has completed the scan. The scanning results can be accessed within onActivityResult:
6. To parse using the web API, call _parse(), and the results can be accessed in the onDriverLicenes method under IResultHandler.
private final IResultHandler _handler = new IResultHandler() { @Override public void onDriverLicense(DriverLicense result) { _current_action = null; _updateUI(); final String address = result.getAddress1(); if(address != null) _tv_result.setText("Address: " + address); else _tv_result.setText("Address: empty"); }