Fingerprint’s Device Intelligence platform for Android helps you to accurately identify the devices on which your mobile app is being used. The platform also provides high-quality Smart Signals that will help you identify risky transactions before they happen. The Fingerprint Pro Demo App for Android allows you to effortlessly experience the capabilities of our device intelligence platform.
This repository contains the source code for the Fingerprint Pro Demo App for Android. It shall serve as a good example
- For integrating the Fingerprint Identification SDK in your Android app, complimenting our Getting Started Guide;
- For best practices to follow when using the Fingerprint Identification SDK in your app.
You can install the app using one of the following methods:
- Install from Google Play
- Download and install .apk file from the Releases page
- Build the app from sources
Build the app from sources in a few simple steps:
-
Clone the repository:
git clone https://github.com/fingerprintjs/fingerprint-device-intelligence-android-demo.git
-
Open the cloned repository in Android Studio.
-
Open the file
app/src/main/java/com/fingerprintjs/android/fpjs_pro_demo/constants/Credentials.kt
and replace the value forapiKey
with your Public API Key. You can find the Public API Key in your dashboard under API Keys.import com.fingerprintjs.android.fpjs_pro.Configuration object Credentials { val apiKey: String = "YOUR_PUBLIC_API_KEY" }
-
Replace the value for
endpointUrl
with one of our endpoints or with your custom endpoint, as applicable.import com.fingerprintjs.android.fpjs_pro.Configuration object Credentials { val endpointUrl: String = Configuration.Region.US.endpointUrl }
-
In the "Build Variants" tool window, choose a build variant that suits your needs. You can read more about all the available build variants in file app/build.gradle.kts
-
Run the app on the selected device
Note
The debug
and debugOptimized
variants of the app include an icon that allows you to iteratively build the UI without making an actual request to our Fingerprint servers. And save API calls!
Following up on the information provided in our Getting Started Guide, you might refer to this repository for an example of:
- The SDK configuration code is located at the
di
package of the app module. - The method
getVisitorId()
method is abstracted in IdentificationProvider class.
The method IdentificationProvider.getVisitorId()
is called in the file HomeViewModel.kt file. The result is displayed by the EventDetailsView composable either in prettified or raw format.
The source code in this repository is licensed under the MIT license.