Official Android library for 100% accurate device identification, created for the Fingerprint Pro API.
import com.fingerprintjs.android.fpjs_pro.Configuration
import com.fingerprintjs.android.fpjs_pro.FingerprintJSFactory
...
// Trust your user's identifiers with the Fingerprint Pro
val fpjsClient = FingerprintJSFactory(applicationContext).createInstance(
Configuration(
apiKey = "your-public-api-key"
)
)
fpjsClient.getVisitorId { result ->
val visitorId = result.visitorId
// Use the visitorId
}
Fingerprint Pro is a professional visitor identification service that processes all information server-side and transmits it securely to your servers using server-to-server APIs.
This identification library generates an accurate, sticky, and stable Fingerprint Pro visitor identifier in Android apps. The identifier is linked to a device, i.e. it is the same in all the apps on a device, even if you reinstall or clone them. This library requires a free API key to connect to the Fingerprint Pro API.
Tip
Check out the Fingerprint Pro Demo App to better understand and experience the capabilities of our device intelligence platform.
For local Android fingerprinting and identifying without making requests to API take a look at the fingerprintjs-android repository.
If you are interested in the iOS platform, you can also check our Fingerprint Pro iOS.
- Fingerprint PRO now supports a Smart Signals functionality, including Root Detection and Emulator detection. The results are available in the response of the
GET /events
Server API method. - Access to the Smart Signals functionality is currently only available upon request for Enterprise customers. Contact Support (support@fingerprint.com) to enable it for your subscription.
The Android SDK requires Android 5.0 (API level 21+) or higher.
If your version of Gradle is earlier than 7, add these lines to your build.gradle
.
allprojects {
repositories {
...
maven { url 'https://maven.fpregistry.io/releases' }
maven { url 'https://jitpack.io' }
}}
If your version of Gradle is 7 or newer, add these lines to your settings.gradle
.
repositories {
...
maven { url 'https://maven.fpregistry.io/releases' }
maven { url 'https://jitpack.io' }
}
dependencies {
...
implementation "com.fingerprint.android:pro:2.5.0"
}
Note: Fingerprint PRO Android uses FingerprintJS Android, kotlin-stdlib and androidx.core:core as dependencies. Additionally, com.google.android.gms:play-services-location is required when Geolocation Spoofing Detection Smart Signal functionality is used.
Retrieve the visitor identifier using Public API key. You can find your Public API key in your dashboard.
import com.fingerprintjs.android.fpjs_pro.Configuration
import com.fingerprintjs.android.fpjs_pro.FingerprintJSFactory
...
// Initialization
val factory = FingerprintJSFactory(applicationContext)
val configuration = Configuration(
apiKey = "your-public-api-key"
)
val fpjsClient = factory.createInstance(
configuration
)
// Usage
fpjsClient.getVisitorId { visitorIdResponse ->
val visitorId = visitorIdResponse.visitorId
// Use the ID
}
import com.fingerprintjs.android.fpjs_pro.Configuration;
import com.fingerprintjs.android.fpjs_pro.FingerprintJS;
import com.fingerprintjs.android.fpjs_pro.FingerprintJSFactory;
...
FingerprintJSFactory factory = new FingerprintJSFactory(this.getApplicationContext());
Configuration configuration = new Configuration(
"your-public-api-key"
);
FingerprintJS fpjsClient = factory.createInstance(
configuration
);
fpjsClient.getVisitorId(visitorIdResponse -> {
// Use the ID
String visitorId = visitorIdResponse.getVisitorId();
return null;
});
When publishing to the Play Market make sure you've noted the following information about collected data:
Data Types | Collected | Shared | Processed ephemerally | Required or Optional | Purposes |
---|---|---|---|---|---|
User IDs | Yes | No | No | Required | Fraud Prevention |
Device or other IDs | Yes | No | No | Required | Fraud Prevention |