Skip to main content

Veritran Docs

Integration

In this step, you need to integrate XpressPlug as a dependency on your Android Project. To do this, add the following Maven repository on the build.gradle file, as shown below.

maven {
url "https://developer.veritran.com/resources/api/v4/groups/10/-
/packages/maven"
name "GitLab"
credentials(HttpHeaderCredentials) {
name = 'Credential-Test'
value = '12345'
}
authentication {
header(HttpHeaderAuthentication)
}
}

In the "name" and "value" variables, enter the credential provided to you by Veritran.

Next, you need to add XpressPlug as a dependency to the current project, with any other dependencies needed. Add the following values to the "dependency" block on the build.gradle file.

implementation ('com.veritran:ui_interfaces:7.3.0.2')
implementation ('com.veritran:xpressplug:7.3.0.2')

Add the external libraries that are consumed by XpressPlug.

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.karumi:dexter:6.2.1'
implementation 'org.nanohttpd:nanohttpd-webserver:2.3.1'
implementation 'com.scottyab:rootbeer-lib:0.0.8'
implementation 'androidx.core:core:1.3.0'
implementation 'androidx.fragment:fragment:1.1.0'
implementation 'com.google.android.gms:play-services-basement:17.0.0'
implementation 'com.google.code.gson:gson:2.7'
implementation 'com.google.guava:guava:29.0-android'
implementation 'com.madgag.spongycastle:core:1.50.0.0'
implementation 'com.madgag.spongycastle:prov:1.50.0.0'
implementation 'com.madgag.spongycastle:pkix:1.50.0.0'
implementation 'org.apache.commons:commons-text:1.2'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.squareup.duktape:duktape-android:1.3.0'
implementation 'org.greenrobot:eventbus:3.0.0'

Finally, add the following values to the manifest file, in the Application tag.

<uses-library android:name="org.apache.http.legacy" android:required="false" />

From now on, you can go Android Studio and select Build > Clean Project or Build > Rebuild to verify if the project is configured properly.