FingerprintJS Android

Identifies Android application users even when they purge data storage. Allows you to detect account takeovers, account sharing and repeated malicious activity.
FingerprintJS Android logo

FingerprintJS Android


Lightweight Library for Device Identification and Fingerprinting

Fully written in Kotlin, 100% Crash-free. Creates a device identifier from all available platform signals. The identifier is fully stateless and will remain the same after reinstalling or clearing application data.


Quick Start


1. Add Repository

Add these lines to your build.gradle.

allprojects {
    repositories {
        ... 
        maven { url 'https://jitpack.io' }    
    }
}

2. Add Dependency

Add this to a build.gradle of a module.

dependencies {
    ...
    implementation "com.github.fingerprintjs:fingerprint-android:2.2.0"
}

Usage


Kotlin

Initialization:

val fingerprinter = FingerprinterFactory.create(context)

Usage:

fingerprinter.getFingerprint(version = Fingerprinter.Version.V_5) { 
    // use fingerprint
}
fingerprinter.getDeviceId(version = Fingerprinter.Version.V_5) { result -> 
    val deviceId = result.deviceId
    // use deviceId
}

Java

Initialization:

Fingerprinter fingerprinter = FingerprinterFactory.create(context);

Usage:

fingerprinter.getFingerprint(Fingerprinter.Version.V_5, fingerprint -> {
    // use fingerprint
    return null;
});
fingerprinter.getDeviceId(Fingerprinter.Version.V_5, deviceIdResult -> {
    String deviceId = deviceIdResult.getDeviceId();
    // use deviceId
    return null;
});

deviceId vs Fingerprint

The library operates with two entities:

  1. deviceId - is a random and unique device identifier.
  2. fingerprint - is a digital device fingerprint.

Which one should I use?

deviceId is guaranteed to be random and should be your first choice for device identification. This identifier can be spoofed though and shouldn't be used in security-focused or fraud detection scenarios.

fingerprint is much harder to spoof and is a safer choice in security-focused use cases.


Versioning

fingerprint is versioned incrementally; the version should be set explicitly to avoid unexpected fingerprint changes when updating the library. See full API reference.


Migration from 1.. Library Versions

The library API has undergone some changes in the major version 2. The older APIs are left as deprecated for now, but are planned to be removed in the future releases.

For the vast majority of library usage scenarios the migration process will be fast and almost effortless.


Fingerprint Android Demo App

Try the library features in the Fingerprint Android Demo App.


Android API Support

fingerprint-android supports API versions from 21 (Android 5.0) and higher.





> Visit FingerprintJS Android Website <