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.
-
In file
app/src/main/java/com/fingerprintjs/android/fpjs_pro_demo/constants/Credentials.kt
,-
Replace the value for
apiKey
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" }
-
If you do not have a custom sub-domain or a proxy integration, then the value of
endpointUrl
should match the region you specified when registering your app with Fingerprint.import com.fingerprintjs.android.fpjs_pro.Configuration object Credentials { val endpointUrl: String = Configuration.Region.US.endpointUrl }
-
If you have set up a have a custom sub-domain or a proxy integration, then the value of
endpointUrl
should represent the endpoint through which you want to route the requests.import com.fingerprintjs.android.fpjs_pro.Configuration object Credentials { val endpointUrl: String = "https://fingerprint.example.com" }
-
-
In the "Build Variants" tool window, choose a build variant that suits your needs. All the available build variants are listed under
buildTypes{...}
in file app/build.gradle.kts💡 The
debug
anddebugOptimized
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! -
Run the app on the selected device
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.