Android Sample App
This guide will help you set up and run the Verisoul Android Sample App, which demonstrates how to integrate Verisoul into an Android application.
About the Sample App
The Verisoul Android SDK is a demonstration project that showcases Verisoul’s fake user detection technology in an Android environment. The app includes:
- Complete integration of Verisoul’s Android SDK
- Touch event tracking and accelerometer data collection
- Session-based fraud detection capabilities
Prerequisites
Before you begin, you’ll need:
- Android Studio installed on your system
- Android development knowledge
- A device or emulator running Android
- A Verisoul Project ID (obtain this by scheduling a call)
Installation Steps
1. Add the Repository
Add the Verisoul Maven repository to your project’s settings.gradle
file:
2. Add the Dependency
You can add the Verisoul dependency using either Groovy DSL or Kotlin DSL.
Using Groovy DSL
Add this line to your module’s build.gradle
file:
Using Kotlin DSL
For Kotlin DSL with version catalogs:
-
Add these lines to your
libs.versions.toml
file:Under the
[versions]
section:Under the
[libraries]
section: -
Then add this to your module’s
build.gradle.kts
file:
3. Implementation
Initialize the SDK
Create or modify your Application class to initialize Verisoul:
Make sure to register your Application class in your AndroidManifest.xml
:
Get Session ID
Retrieve the session ID when needed:
Implement Touch Event Tracking
Create a base activity to capture touch events:
Then extend your activities from this base class:
What to Expect
Once integrated, the Verisoul SDK will:
- Collect and analyze touch events and accelerometer data
- Generate a unique session ID for risk assessment
- Upload necessary data to Verisoul’s backend
- Provide fraud detection capabilities for your Android application
Next Steps
After exploring the sample app, you can use it as a reference for implementing Verisoul in your own Android applications.
For more detailed documentation, see the Verisoul Integration Guide.