Android – ID Parser SDK
Setup
- Add idscan-public maven repository to the project build.gradle file.
allprojects {
repositories {
...
maven {
url 'https://www.myget.org/F/idscan-public/maven/'
}
...
}
}
- Add the following to the module build.gradle file:
dependencies {
...
implementation 'net.idscan.components.android:dlparser-standard:1.28.4'
...
}
Note
if you have already installed version before 1.28.4 you have to remove it from the project.
Usage
- Create
DLParser
object.
DLParser parser = new DLParser();
- Setup License Key. For setup License Key you need to call
setup(Context, String)
. It accepts two parameters: application context and license key encoded as Base64 string.
try {
parser.setup(getApplicationContext(), "** LICENSE_KEY **");
} catch(DLParserException e) {
// TODO: handle the error.
}
- Parse the data. For parsing data you need to call
parse(byte[])
method.
try {
DLResult res = parser.parse(data);
} catch(DLParserException | UnsupportedEncodingException e) {
// TODO: handle the error.
}
You will find a complete example of using the library in MainActivity.java
.
Obtaining a License Key
In order to receive the License Key send an email to support@idscan.net with the Package Name. Please be sure to provide your order number in the email once ready to upgrade from trial to production mode. Copy the received key into the _KEY field when setting up the DLParser() object as in the code above.