---
title: Setting up the pingonemfa module on Android
description: Add the pingonemfa module to your Android app and initialize it with your PingOne geography before pairing the device.
component: orchsdks
page_id: orchsdks:davinci:use-cases/pingone-mfa/android/01-setup
canonical_url: https://developer.pingidentity.com/orchsdks/davinci/use-cases/pingone-mfa/android/01-setup.html
llms_txt: https://developer.pingidentity.com/orchsdks/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
keywords: ["DaVinci", "MFA", "PingOne", "Android", "Setup", "Initialization", "SDK"]
section_ids:
  adding_the_module: Adding the module
  initializing_the_module: Initializing the module
---

# Setting up the pingonemfa module on Android

[icon: circle-check, set=far]PingOne [icon: android, set=fab]Android

Before your app can pair devices or respond to authentication challenges, add the `pingonemfa` module to your app and initialize it with your PingOne geography.

## Adding the module

To add the `pingonemfa` module to your Android app:

1. In the **Project** tree view of your Android Studio project, open the `build.gradle.kts` file.

2. Add the `pingonemfa` module as a dependency:

   Gradle dependency for the pingonemfa module

   ```kotlin
   dependencies {
       implementation("com.pingidentity.sdks:davinci:2.2.0")
       implementation("com.pingidentity.sdks:pingonemfa:{latest_android_mfa_vers}")
   }
   ```

|   |                                                                                                                                                                                                                                                                  |
| - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | The module declares the `FOREGROUND_SERVICE` and `FOREGROUND_SERVICE_REMOTE_MESSAGING` permissions in its own manifest, and they merge into your app automatically.These are required for responding to approve and deny actions on system notification banners. |

## Initializing the module

In your application startup code, import the required modules, call `initialize`, and pass in the geography of the region where your PingOne environment is provisioned:

Initializing the pingonemfa module

```kotlin
import com.pingidentity.pingonemfa.commons.Geo
import com.pingidentity.pingonemfa.commons.PingOneMFA
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.launch

CoroutineScope(SupervisorJob()).launch {
    PingOneMFA.initialize(Geo.NORTH_AMERICA)
        .onFailure { e ->
            Log.e("MFA", "Initialization failed: ${e.message}")
        }
}
```

The available geographies are:

| Geography     | Value               |
| ------------- | ------------------- |
| North America | `Geo.NORTH_AMERICA` |
| Europe        | `Geo.EUROPE`        |
| Canada        | `Geo.CANADA`        |
| Australia     | `Geo.AUSTRALIA`     |
| Singapore     | `Geo.SINGAPORE`     |
