Skip to content

Setup

mValid SDK comes with some third-party library dependencies.

Also, the usage requires permissions that have to do with accessing Bluetooth and Camera. These permissions must be checked and requested in the application and the end-user must grant, in order to use the SDK features.

Dependencies

You will need to include the following dependencies to your app project.

build.gradle
dependencies {
    implementation "com.google.code.gson:gson:2.9.1"
    implementation "org.bouncycastle:bcprov-jdk15on:1.70"
    implementation "org.bouncycastle:bcpkix-jdk15on:1.70"
    implementation "commons-codec:commons-codec:1.12"
    implementation "org.apache.commons:commons-lang3:3.9"
    implementation "com.upokecenter:cbor:3.5.0"
    implementation "com.nimbusds:nimbus-jose-jwt:9.25.6"
    implementation "net.sf.scuba:scuba-sc-android:0.0.23"
}

Scan QR

If you want to use the qr code scanner that comes with the SDK and the QRDeviceEngagement class, add the following dependencies.

settings.gradle
dependencyResolutionManagement {
    repositories {
        // ...
        maven { url 'https://jitpack.io' }
    }
}
build.gradle
dependencies {
    // If you want to use the qr code scanner that comes with
    // the SDK
    implementation "com.github.yuriy-budiyev:code-scanner:2.3.2"
}

Permissions

For Android SDK >= 31 the following permissions are needed:

  • android.Manifest.permission.BLUETOOTH_ADVERTISE
  • android.Manifest.permission.BLUETOOTH_SCAN
  • android.Manifest.permission.BLUETOOTH_CONNECT

and for any previous versions (Android SDK < 31) the following permissions needed:

  • android.Manifest.permission.ACCESS_FINE_LOCATION
  • android.Manifest.permission.ACCESS_COARSE_LOCATION

Also, the android.Manifest.permission.CAMERA is needed if you use the built-in QR scanner for the Device Engagement.