# Accept Video Selfie

The Accept Video Selfie module presents a consent screen that asks the user to agree to having a video selfie recorded later in the flow. It signals once the user accepts. This module is in beta.

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 Accept Video Selfie

1. Add the module with `addAcceptVideoSelfie()`:

   ```kotlin
   flowConfigBuilder.addAcceptVideoSelfie()
   ```
   ```java
   flowConfigBuilder.addAcceptVideoSelfie();
   ```

2) Add the [Video Selfie](https://developer.incode.com/docs/android-video-selfie) module directly after Accept Video Selfie.

### Example

The example below adds Accept Video Selfie before the Video Selfie step, then listens for the user's acceptance through `onUserAcceptedVideoSelfie()`.

```kotlin
val videoSelfie = VideoSelfie.Builder()
    .setSelfieMode(VideoSelfie.SelfieMode.SELFIE_MATCH)
    .build()

val flowConfig = FlowConfig.Builder()
    .addAcceptVideoSelfie()
    .addVideoSelfie(videoSelfie)
    .build()

val onboardingListener = object : OnboardingListener() {
    override fun onUserAcceptedVideoSelfie() {
        // User accepted the video selfie recording. Continue the flow.
    }
}

IncodeWelcome.getInstance()
    .startOnboarding(activityContext, sessionConfig, flowConfig, onboardingListener)
```
```java
FlowConfig flowConfig = new FlowConfig.Builder()
    .addAcceptVideoSelfie()
    // ... add the Video Selfie step after it
    .build();

IncodeWelcome.OnboardingListener onboardingListener = new IncodeWelcome.OnboardingListener() {
    @Override
    public void onUserAcceptedVideoSelfie() {
        // User accepted the video selfie recording. Continue the flow.
    }
};

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

## Configuration Options

Accept Video Selfie has no configurable settings. It is added with the no-argument `addAcceptVideoSelfie()` method.

## Result

Accept Video Selfie does not deliver a result payload to the `OnboardingListener`. It signals completion through the no-argument `onUserAcceptedVideoSelfie()` callback, which fires when the user accepts the video selfie recording.

Errors surface through `OnboardingListener.onError(Throwable)`. This module does not deliver a module-specific exception subtype.

For the related result type, see `AcceptVideoSelfieResult` in [API Reference](https://developer.incode.com/docs/android-api-reference).
