Device Fingerprinting - Android Integration

This page describes how to add the Threatmetrix SDK to your Android project.

Click here to download a zip file containing the files you will need.

Once you have added the ThreatMetrix files to your project, your application will automatically generate a device fingerprint during initialization.

Integration

The sections below describe how to add the ThreatMetrix modules to your Android project. The Overview section describes the process and defines the files you will need to include. The Guide section provides step-by-step instructions for adding the modules to your project and ensuring that your application has the required settings.

Overview

Integrating Device Fingerprinting into your application requires creating new modules for the following files that are provided by Threatmetrix:

  • TMXProfilingConnections.aar - Handles transferring data to and from the Threatmetrix backend.
  • TMXProfiling.aar - Manages the generation of device profiles.

Guide

Follow the steps below to add the ThreatMetrix modules to your project:

  1. Save the ThreatMetrix modules to your local machine: TMXProfiling.aar, and TMXProfilingConnections.aar.
  2. Open your project in AndroidStudio.
  3. From the main menu, select File > New > New Module, as shown in the image below: New Module
  4. On the Create New Module screen, select “Import .JAR/.AAR Package”, as shown in the image below. Then click the Next button. Import
  5. Enter the path to the TMXProfiling.aar file. Then click Finish.
  6. Repeat steps 3, 4, and 5 for the TMXProfilingConnections.aar module.
  7. Open your settings.gradle file, and confirm that TMXProfiling and TMXProfilingConnections are listed at the top, as shown in the image below. Add the files to the list if they are not already added. TMXBehavioralBiometrics.aar, and TMXDeviceSecurityHealth.aar are not required for this integration. Gradle
  8. Open the app module’s build.gradle file and add a new line to the dependencies block for each module, as shown in the image below. TMXBehavioralBiometrics.aar, and TMXDeviceSecurityHealth.aar are not required for this integration. Build
  9. Sync your application.
  10. Open your AndroidManifest.xml file and add INTERNET permissions to your application, if it is not already added. The image below shows the AndroidManifest.xml with INTERNET permissions added: Manifest