Integrate the Client Device Data Collector SDK

Prev Next

Android

AAR artifact-based integration

To integrate the CDDC SDK in your Android project via aar file

  1. Link CDDCSDK.aar from the OneSpan Mobile Security Suite package to your project's classpath.

  2. (OPTIONAL) Set the correct permissions for device data collection in the AndroidManifest.xml file:

    • Bluetooth/Wi-Fi: ACCESS_FINE_LOCATION

    • Wi-Fi: ACCESS_WIFI_STATE, ACCESS_NETWORK_STATE and CHANGE_WIFI_STATE

    • Bluetooth: BLUETOOTH and BLUETOOTH_ADMIN for Android versions lower than 12

    • Bluetooth: BLUTOOTH_CONNECT and BLUETOOTH_SCAN for Android versions 12 and higher

    • BehavioSec: ACCESS_COARSE_LOCATION, GET_ACCOUNTS, and GET_TASKS

    • Phone state: READ_PHONE_STATE

Maven-based integration

The SDK artifact is also delivered as a local Maven repository with transitive dependencies, and the package includes a documentation jar file to view the technical documentation in Android Studio (to be used in conjunction with the Maven repository).

To integrate the SDK via maven repository

  1. Copy the maven folder from the published artifacts to the root folder of your application.

  2. Define the dependency in your build.gradle file: implementation 'com.onespan:sdk_cddc_android:+'.

  3. Comment out any existing definitions, for example: implementation(name: 'CDDCSDK', ext: 'aar').

You are now ready to use the CDDC SDK. For more information about the integration of the functions, refer to the API documentation or see the sample attached to the SDK product package.

When you call the getCollectedCDDCData method, ensure that the context parameter is not null.

For more information about BehavioSec, refer to the BehavioSec documentation. (To access the material on this website, you need to log in with your BehavioSec developer credentials.)

The sample included in the product package does not work on emulators with API 21 and 22.

Considerations for the device unique identifier

The CDDC SDK needs a unique Identifier associated with the device. This mapping is done on the server side of the CDDC SDK. If the device fingerprint generated by Device Binding SDK is used as the unique identifier, it is not possible to perform a migration from one fingerprint to another. The new identifier would provide faulty data to the Risk Analytics service. A new device fingerprint needs to be generated using the Hardware parameter.

iOS

To integrate the CDDC SDK into your iOS project

  1. Link MSSCDDC.xcframework from the OneSpan Mobile Security Suite package to your Xcode project (linked framework and libraries).
    The BehavioSecIOSSDK.xcframework, which is required to capture behavioral data, is automatically included in the MSSCDDC.xcframework.

  2. Add the following keys and their description to the .plist file of your project:

    • NSFaceIDUsageDescription

    • NSLocationWhenInUseUsageDescription

    • NSBluetoothPeripheralUsageDescription

    • NSBluetoothAlwaysUsageDescription

If you use the -ObjC flag you will need to add a Swift file and a bridging header to your project.

You are now ready to use the CDDC SDK.

API reference documentation and sample applications

To learn more about the public APIs and their functions, exceptions, and error codes, refer to the technical documentation that is included in the product package for each SDK and each platform. In the product package, you can also find the sample applications provided for each platform to see examples of how the SDKs can be used.

These sample apps are intended only to demonstrate basic scenarios and SDK usage. They are not designed to be copied directly into production projects!

For more information about BehavioSec, refer to the BehavioSec documentation and downloads page. (To access the material on this website, you need to log in with your BehavioSec developer credentials.)