# Intro

The Intro module displays an introduction screen. It lists the documents and checks the user will need to complete.

There is no Dashboard equivalent for this module, so you cannot use [integration Pattern 3](https://developer.incode.com/docs/android-common-implementation-patterns#pattern-3-run-flows-configured-in-dashboard) to add it. You must use [Pattern 1](https://developer.incode.com/docs/android-common-implementation-patterns#pattern-1-configure-flows-locally-and-run-end-to-end) or [2](https://developer.incode.com/docs/android-common-implementation-patterns#pattern-2-configure-flows-locally-and-run-step-by-step), adding the module to a `FlowConfig` in code as shown on this page.

## Add Intro

Add the module with `addIntro(intro)`. Intro is meant to run first, so add it before your capture modules.

```kotlin
flowConfigBuilder.addIntro(intro)
```
```java
flowConfigBuilder.addIntro(intro);
```

### Example

The example below builds an `Intro` listing the ID and selfie checks, adds it as the first step in the flow, and continues once the user finishes the screen.

```kotlin
val intro = Intro.Builder()
    .setIntroChecks(listOf(IntroChecks.ID, IntroChecks.SELFIE))
    .build()

val flowConfig = FlowConfig.Builder()
    .addIntro(intro)
    // ... add your capture modules after it
    .build()

val onboardingListener = object : OnboardingListener() {
    override fun onIntroCompleted() {
        // The user finished the intro screen. Continue the flow.
    }
}

IncodeWelcome.getInstance()
    .startOnboarding(activityContext, sessionConfig, flowConfig, onboardingListener)
```
```java
Intro intro = new Intro.Builder()
    .setIntroChecks(Arrays.asList(IntroChecks.ID, IntroChecks.SELFIE))
    .build();

FlowConfig flowConfig = new FlowConfig.Builder()
    .addIntro(intro)
    // ... add your capture modules after it
    .build();

IncodeWelcome.OnboardingListener onboardingListener = new IncodeWelcome.OnboardingListener() {
    @Override
    public void onIntroCompleted() {
        // The user finished the intro screen. Continue the flow.
    }
};

IncodeWelcome.getInstance()
    .startOnboarding(activityContext, sessionConfig, flowConfig, onboardingListener);
```

## Configuration Options

Configure the module with `Intro.Builder`. At least one intro check is required, or the module fails configuration.

| Setting                                   | Description                                                                                                                                                 |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `setIntroChecks(List<IntroChecks>)`       | Sets the list of documents and checks shown on the intro screen: for example, `ID`, `PASSPORT`, `SELFIE`, and `PROOF_OF_ADDRESS`. At least one is required. |
| `setAllowContinueWithoutConsent(boolean)` | Lets the user continue from the intro screen without explicitly accepting. Defaults to `false`.                                                             |

The intro checks you list should reflect the capture modules you add to the same flow, so the screen matches what the user is actually asked to complete.

For the complete option set, see `Intro.Builder` and the `IntroChecks` values in [API Reference](https://developer.incode.com/docs/android-api-reference).

## Result

Intro does not deliver a result payload to the `OnboardingListener`. It signals completion through the no-argument `onIntroCompleted()` callback, which fires when the user finishes the intro screen.

If the module cannot complete, errors surface through `OnboardingListener.onError(Throwable)`.
