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.
Add these lines to your build.gradle
.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add this to a build.gradle
of a module.
dependencies {
...
implementation "com.github.fingerprintjs:fingerprint-android:2.2.0"
}
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
}
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;
});
The library operates with two entities:
deviceId
- is a random and unique device identifier.fingerprint
- is a digital device fingerprint.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.
fingerprint
is versioned incrementally; the version should be set explicitly to avoid unexpected fingerprint
changes when updating the library. See full API reference.
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.
Try the library features in the Fingerprint Android Demo App.
fingerprint-android supports API versions from 21 (Android 5.0) and higher.
> Visit FingerprintJS Android Website <