Link Android SDK 
=================

#### Learn how to integrate your app with the Link Android SDK 

#### Overview 

The Plaid Link SDK is a quick and secure way to link bank accounts to Plaid in your Android app. Link is a drop-in module that handles connecting a financial institution to your app (credential validation, multi-factor authentication, error handling, etc.), without passing sensitive personal information to your server.

To get started with Plaid Link for Android, clone the [GitHub repository](https://github.com/plaid/plaid-link-android) and try out the example application, which provides a reference implementation in both Java and Kotlin. You'll want to sign up for [free API keys](https://dashboard.plaid.com/developers/keys) through the Plaid Dashboard to get started.

Prefer to learn by watching? A [video guide](https://youtu.be/oM7vL49I5tc) is available for this content.

#### Initial Android setup 

Before writing code using the SDK, you must first perform some setup steps to register your app with Plaid and configure your project.

##### Register your app ID 

To register your Android app ID:

1.  Sign in to the [Plaid Dashboard](https://dashboard.plaid.com/signin) and go to the [Developers -> API](https://dashboard.plaid.com/developers/api) page.
2.  Next to **Allowed Android package names** click **Configure** then **Add New Android Package Name**.
3.  Enter your package name, for example `com.plaid.example`.
4.  Click **Save Changes**.

Your Android app is now set up and ready to start integrating with the Plaid SDK.

New versions of the Android SDK are released frequently, at least once every few months. Major releases occur annually. You should keep your version up-to-date to provide the best Plaid Link experience in your application.

##### Update your project plugins 

In your root-level (project-level) Gradle file (`build.gradle`), add rules to include the Android Gradle plugin. Check that you have Google's Maven repository as well.

build.gradle (Project-level)

```groovy
buildscript {
    repositories {
        // Check that you have the following line (if not, add it):
        google()  // Google's Maven repository
        mavenCentral() // Include to import Plaid Link Android SDK
    }
    dependencies {
        // ...
    }
}
```

##### Add the PlaidLink SDK to your app 

In your module (app-level) Gradle file (usually `app/build.gradle`), add a line to the bottom of the file. The latest version of the PlaidLink SDK is (An image of "Maven Central") and can be found on [Maven Central](https://search.maven.org/artifact/com.plaid.link/sdk-core) .

build.gradle (App-level)

```kotlin
android {
  defaultConfig {
    minSdkVersion 21 // or greater
  }
}

dependencies {
  // ...
  implementation 'com.plaid.link:sdk-core:<insert latest version>'
}
```

##### Enable camera support (Identity Verification only) 

If your app uses [Identity Verification](https://plaid.com/docs/identity-verification/index.html.md) , a user may need to take a picture of identity documentation or a selfie during the Link flow. To support this workflow, the [CAMERA](https://developer.android.com/reference/android/Manifest.permission#CAMERA) , [WRITE\_EXTERNAL\_STORAGE](https://developer.android.com/reference/android/Manifest.permission#WRITE_EXTERNAL_STORAGE) , [RECORD\_AUDIO](https://developer.android.com/reference/android/Manifest.permission#RECORD_AUDIO) , and [MODIFY\_AUDIO\_SETTINGS](https://developer.android.com/reference/android/Manifest.permission#MODIFY_AUDIO_SETTINGS) permissions need to be added to your application's `AndroidManifest.xml`. (While Plaid does not record any audio, some older Android devices require these last two permissions to use the camera.) The `WRITE_EXTERNAL_STORAGE` permission should be limited to < Android 9 (i.e. maxSdk=28). If these permissions are not granted in an app that uses Identity Verification, the app may crash during Link.

#### Opening Link 

Before you can open Link, you need to first create a `link_token` by calling [/link/token/create](https://plaid.com/docs/api/link/index.html.md#linktokencreate) from your backend. This call should **never** happen directly from the mobile client, as it risks exposing your API secret. The [/link/token/create](https://plaid.com/docs/api/link/index.html.md#linktokencreate) call must include the `android_package_name` parameter, which should match the `applicationId` from your app-level `build.gradle` file. You can learn more about `applicationId` in Google's [Android developer documentation](https://developer.android.com/studio/build/application-id) .

```ruby
link_token_create_request = Plaid::LinkTokenCreateRequest.new(
  {
    user: {
      client_user_id: "user-id",
    },
    client_name: 'Plaid Test App',
    products: ['auth'],
    country_codes: ['US'],
    language: "en",
    redirect_uri: nil_if_empty_envvar('PLAID_REDIRECT_URI'),
    webhook: 'https://webhook.sample.com',
    link_customization_name: "default",
    android_package_name: "com.plaid.example"
  }
)
response = client.link_token_create(
  link_token_create_request
)
link_token = response.link_token

```

```go
ctx := context.Background()

user := plaid.LinkTokenCreateRequestUser{
    ClientUserId: "USER_ID_FROM_YOUR_DB",
}
request := plaid.NewLinkTokenCreateRequest(
  "Plaid Test",
  "en",
  []plaid.CountryCode{plaid.COUNTRYCODE_US},
)
request.SetUser(user)
request.SetProducts([]plaid.Products{plaid.PRODUCTS_AUTH})
request.SetLinkCustomizationName("default")
request.SetWebhook("https://webhook-uri.com")
request.SetAndroidPackageName("com.plaid.example")
resp, _, err := client.PlaidApi.LinkTokenCreate(ctx).LinkTokenCreateRequest(*request).Execute()

linkToken := resp.GetLinkToken()

```

```java
String clientUserId = "user-id";

LinkTokenCreateRequestUser user = new LinkTokenCreateRequestUser()
  .clientUserId(clientUserId)
  .legalName("legal name")
  .phoneNumber("4155558888")
  .emailAddress("email@address.com");

LinkTokenCreateRequest request = new LinkTokenCreateRequest()
  .user(user)
  .clientName("Plaid Test App")
  .products(Arrays.asList(Products.AUTH))
  .countryCodes(Arrays.asList(CountryCode.US))
  .language("en")
  .webhook("https://example.com/webhook")
  .linkCustomizationName("default")
  .androidPackageName("com.plaid.example");

Response response = client()
  .linkTokenCreate(request)
  .execute();

String linkToken = response.body().getLinkToken();

```

```python
request = LinkTokenCreateRequest(
    products=[Products('auth'), Products('transactions')],
    client_name="Plaid Test App",
    country_codes=[CountryCode('GB')],
    language='en',
    webhook='https://sample-webhook-uri.com',
    link_customization_name='default',
    android_package_name='com.plaid.example',
    user=LinkTokenCreateRequestUser(
        client_user_id='123-test-user-id'
    )
)
# create link token
response = client.link_token_create(request)
link_token = response['link_token']

```

```node
const request: LinkTokenCreateRequest = {
  user: {
    client_user_id: 'user-id',
  },
  client_name: 'Plaid Test App',
  products: ['auth', 'transactions'],
  country_codes: ['GB'],
  language: 'en',
  webhook: 'https://sample-web-hook.com',
  android_package_name: 'com.plaid.example'
};
try {
  const response = await plaidClient.linkTokenCreate(request);
  const linkToken = response.data.link_token;
} catch (error) {
  // handle error
}

```

```bash
curl -X POST https://sandbox.plaid.com/link/token/create -H 'Content-Type: application/json' -d '{
  "client_id": "${PLAID_CLIENT_ID}",
  "secret": "${PLAID_SECRET}",
  "user": { "client_user_id": "${UNIQUE_USER_ID}" },
  "client_name": "Plaid App",
  "products": ["auth"],
  "country_codes": ["GB"],
  "language": "en",
  "webhook": "https://sample-web-hook.com",
  "android_package_name": "com.plaid.example"
}'

```

##### Create a LinkTokenConfiguration 

Each time you open Link, you will need to get a new `link_token` from your server and create a new `LinkTokenConfiguration` object with it.

```kotlin
val linkTokenConfiguration = linkTokenConfiguration {
  token = "LINK_TOKEN_FROM_SERVER"
}


```

```java
LinkTokenConfiguration linkTokenConfiguration = new LinkTokenConfiguration.Builder()
    .token("LINK_TOKEN_FROM_SERVER")
    .build();

```

The Link SDK runs as a separate `Activity` within your app. In order to return the result to your app, it supports both the standard `startActivityForResult` and `onActivityResult` and the `ActivityResultContract` [result APIs](https://developer.android.com/training/basics/intents/result) .

Select group for content switcher

Activity Result APIsStandard Activity APIs

##### Register a callback for an Activity Result 

```kotlin
private val linkAccountToPlaid =
registerForActivityResult(FastOpenPlaidLink()) {
  when (it) {
    is LinkSuccess -> /* handle LinkSuccess */
    is LinkExit -> /* handle LinkExit */
  }
}

```

```java
private ActivityResultLauncher linkAccountToPlaid = registerForActivityResult(new FastOpenPlaidLink(),
  result -> {
    if (result instanceof LinkSuccess) {
      /* handle LinkSuccess */
    } else {
      /* handle LinkExit */
    }
  }
);

```

##### Create a PlaidHandler 

Create a `PlaidHandler` - A `PlaidHandler` is a one-time use object used to open a Link session. It should be created as early as possible to warm up Link so that it opens quickly. We recommend doing this as early as possible, since it must be completed before Link opens, and if you create it just before opening Link, it can have a perceptible impact on Link startup time.

```kotlin
val plaidHandler: PlaidHandler = 
  Plaid.create(application, linkTokenConfiguration)

```

```java
plaidHandler = Plaid.create(this.getApplication(), linkTokenConfiguration);

```

##### Open Link 

```kotlin
linkAccountToPlaid.launch(plaidHandler)

```

```java
linkAccountToPlaid.launch(plaidHandler);

```

At this point, Link will open, and will trigger the `onSuccess` callback if the user successfully completes the Link flow.

\=\*=\*=\*=

#### onSuccess 

The method is called when a user successfully links an Item. The onSuccess handler returns a `LinkConnection` class that includes the `public_token`, and additional Link metadata in the form of a `LinkConnectionMetadata` class.

**Properties**

String

Displayed once a user has successfully completed Link. If using Identity Verification or Beacon, this field will be `null`. If using Document Income or Payroll Income, the `public_token` will be returned, but is not used.

Object

Displayed once a user has successfully completed Link.

List<LinkAccount>

A list of accounts attached to the connected Item. If Account Select is enabled via the developer dashboard, `accounts` will only include selected accounts.

string

The Plaid `account_id`

string

The official account name

nullable, string

The last 2-4 alphanumeric characters of an account's official account number. Note that the mask may be non-unique between an Item's accounts, it may also not match the mask that the bank displays to the user.

LinkAccountSubtype

The account subtype. See the [Account schema](https://plaid.com/docs/api/accounts/index.html.md#account-type-schema) for a full list of possible values

LinkAccountType

The account type. See the [Account schema](https://plaid.com/docs/api/accounts/index.html.md#account-type-schema) for a full list of possible values

nullable, string

Indicates an Item's micro-deposit-based verification or database verification status. Possible values are:

`pending_automatic_verification`: The Item is pending automatic verification

`pending_manual_verification`: The Item is pending manual micro-deposit verification. Items remain in this state until the user successfully verifies the deposit.

`automatically_verified`: The Item has successfully been automatically verified

`manually_verified`: The Item has successfully been manually verified

`verification_expired`: Plaid was unable to automatically verify the deposit within 7 calendar days and will no longer attempt to validate the Item. Users may retry by submitting their information again through Link.

`verification_failed`: The Item failed manual micro-deposit verification because the user exhausted all 3 verification attempts. Users may retry by submitting their information again through Link.

`database_matched`: The Item has successfully been verified using Plaid's data sources.

`database_insights_pending`: The Database Insights result is pending and will be available upon Auth request.

`null`: Neither micro-deposit-based verification nor database verification are being used for the Item.

nullable, object

An institution object. If the Item was created via Same-Day Micro-deposit verification, will be `null`.

string

The full institution name, such as `'Wells Fargo'`

string

The Plaid institution identifier

nullable, String

A unique identifier associated with a user's actions and events through the Link flow. Include this identifier when opening a support ticket for faster turnaround.

nullable, Map

The data directly returned from the server with no client side changes.

```kotlin
val success = result as LinkSuccess

// Send public_token to your server, exchange for access_token 
// (if using Item-based products)
val publicToken = success.publicToken
val metadata = success.metadata
metadata.accounts.forEach { account ->
  val accountId = account.id
  val accountName = account.name
  val accountMask = account.mask
  val accountSubType = account.subtype
}
val institutionId = metadata.institution?.id
val institutionName = metadata.institution?.name

```

```java
LinkSuccess success = (LinkSuccess) result;

String publicToken = success.getPublicToken();
LinkSuccess.LinkSuccessMetadata metadata = success.getMetadata();
for (LinkAccount account : metadata.getAccounts()) {
  String accountId = account.getId();
  String accountName = account.getName();
  String accountMask = account.getMask();
  LinkAccountSubtype accountSubtype = account.getSubtype();
}
String institutionId = metadata.getInstitution().getId();
String institutionName = metadata.getInstitution().getName();

```

\=\*=\*=\*=

#### onExit 

The `onExit` handler is called when a user exits Link without successfully linking an Item, or when an error occurs during Link initialization. The `PlaidError` returned from the `onExit` handler is meant to help you guide your users after they have exited Link. We recommend storing the error and metadata information server-side in a way that can be associated with the user. You’ll also need to include this and any other relevant information in Plaid Support requests for the user.

**Properties**

Map<String, Object>

An object that contains the error type, error code, and error message of the error that was last encountered by the user. If no error was encountered, `error` will be `null`.

nullable, String

A user-friendly representation of the error code. `null` if the error is not related to user action. This may change over time and is not safe for programmatic use.

String

The particular error code. Each `errorType` has a specific set of `errorCodes`. A code of 499 indicates a client-side exception.

String

A string representation of the error code.

String

A broad categorization of the error.

String

A developer-friendly representation of the error code.

nullable, String

The data directly returned from the server with no client side changes.

Map<String, Object>

An object containing information about the exit event

nullable, String

A unique identifier associated with a user's actions and events through the Link flow. Include this identifier when opening a support ticket for faster turnaround.

nullable, object

An institution object. If the Item was created via Same-Day Micro-deposit verification, will be `null`.

string

The full institution name, such as `'Wells Fargo'`

string

The Plaid institution identifier

nullable, String

The point at which the user exited the Link flow. One of the following values.

User prompted to answer security questions

User prompted to answer multiple choice question(s)

User prompted to solve a reCAPTCHA challenge

User prompted to provide a one-time passcode

User prompted to select a device on which to receive a one-time passcode

User prompted to provide credentials for the selected financial institution or has not yet selected a financial institution

User prompted to select one or more financial accounts to share

User exited the Link flow on the institution selection pane. Typically this occurs after the user unsuccessfully (no results returned) searched for a financial institution. Note that this status does not necessarily indicate that the user was unable to find their institution, as it is used for all user exits that occur from the institution selection pane, regardless of other user behavior.

User exited the Link flow after discovering their selected institution is no longer supported by Plaid

An exit status that is not handled by the current version of the SDK

nullable, String

The request ID for the last request made by Link. This can be shared with Plaid Support to expedite investigation

```kotlin
val exit = result as LinkExit

val error = exit.error
error?.let { err ->
  val errorCode = err.errorCode
  val errorMessage = err.errorMessage
  val displayMessage = err.displayMessage
}
val metadata = exit.metadata
val institutionId = metadata.institution?.id
val institutionName = metadata.institution?.name
val linkSessionId = metadata.linkSessionId;
val requestId = metadata.requestId;

```

```java
LinkExit exit = (LinkExit) result;

LinkError error = exit.getError();
String errorCode = error.getErrorCode();
String errorMessage = error.getErrorMessage();
String displayMessage = error.getDisplayMessage();

LinkExitMetadata metadata = exit.getMetadata();
String institutionId = metadata.getInstitution().getId();
String institutionName = metadata.getInstitution().getName();
String linkSessionId = metadata.getLinkSessionId();
String requestId = metadata.getRequestId();

```

\=\*=\*=\*=

#### onEvent 

The `onEvent` callback is called at certain points in the Link flow. Unlike the handlers for `onSuccess` and `onExit`, the `onEvent` handler is initialized as a global lambda passed to the `Plaid` class. `OPEN`, `LAYER_READY`, `LAYER_NOT_AVAILABLE`, and `LAYER_AUTOFILL_NOT_AVAILABLE` events will be sent in real-time, and remaining events will be sent when the Link session is finished and `onSuccess` or `onExit` is called. Callback ordering is not guaranteed; `onEvent` callbacks may fire before, after, or surrounding the `onSuccess` or `onExit` callback, and event callbacks are not guaranteed to fire in the order in which they occurred. If you need the exact time when an event happened, use the `timestamp` property.

The following `onEvent` callbacks are stable, which means that they are suitable for programmatic use in your application's logic: `OPEN`, `EXIT`, `HANDOFF`, `SELECT_INSTITUTION`, `ERROR`, `BANK_INCOME_INSIGHTS_COMPLETED`, `IDENTITY_VERIFICATION_PASS_SESSION`, `IDENTITY_VERIFICATION_FAIL_SESSION`, `LAYER_READY`, `LAYER_NOT_AVAILABLE`, `LAYER_AUTOFILL_NOT_AVAILABLE`. The remaining callback events are informational and subject to change, and should be used for analytics and troubleshooting purposes only.

**Properties**

String

A string representing the event that has just occurred in the Link flow.

The user was automatically sent an OTP code without a UI prompt. This event can only occur if the user's phone number was provided to Link via the `/link/token/create` call and the user has previously consented to receive OTP codes from Plaid.

The user has completed the Assets and Bank Income Insights flow.

The user closed the third-party website or mobile app without completing the OAuth flow.

The user has chosen to link a new institution instead of linking a saved institution. This event is only emitted in the Link Remember Me flow.

A recoverable error occurred in the Link flow, see the `error_code` metadata.

The user has exited without completing the Link flow and the [onExit](https://plaid.com#onexit) callback is fired.

The user encountered an error while completing the third-party's OAuth login flow.

The user has exited Link after successfully linking an Item.

An Identity Match check configured via the Account Verification Dashboard failed the Identity Match rules and did not detect a match.

An Identity Match check configured via the Account Verification Dashboard passed the Identity Match rules and detected a match.

The user has started a step of the Identity Verification flow. The step is indicated by `view_name`.

The user has passed a step of the Identity Verification flow. The step is indicated by `view_name`.

The user has failed a step of the Identity Verification flow. The step is indicated by `view_name`.

The user has reached the pending review state.

The user has started a new Identity Verification session.

The user has resumed an existing Identity Verification session.

The user has passed their Identity Verification session.

The user has failed their Identity Verification session.

The user has completed their Identity Verification session, which is now in a pending review state.

The user has opened the UI of their Identity Verification session.

The user has resumed the UI of their Identity Verification session.

The user has closed the UI of their Identity Verification session.

The user's date of birth passed to Link is not eligible for Layer Extended Autofill.

The user phone number passed to Link is not eligible for Layer.

The user phone number passed to Link is eligible for Layer and `open()` may now be called.

The user selected an institution that was presented as a matched institution. This event can be emitted if [Embedded Institution Search](https://plaid.com/docs/link/embedded-institution-search/index.html.md) is being used, if the institution was surfaced as a matched institution likely to have been linked to Plaid by a returning user, or if the institution's `routing_number` was provided when calling `/link/token/create`. For details on which scenario is triggering the event, see `metadata.matchReason`.

The user has opened Link.

The user has opened my.plaid.com. This event is only emitted when Link is initialized with Assets as a product.

The user has navigated to a third-party website or mobile app in order to complete the OAuth login flow.

The user has searched for an institution.

The user has opted to not provide their phone number to Plaid. This event is only emitted in the Link Remember Me flow.

The user has chosen whether to Link instantly or manually (i.e., with micro-deposits). This event emits the `selection` metadata to indicate the user's selection.

The user selected a brand, e.g. Bank of America. The `SELECT_BRAND` event is only emitted for large financial institutions with multiple online banking portals.

The user selected an institution with a `DEGRADED` health status and was shown a corresponding message.

The user selected an institution with a `DOWN` health status and was shown a corresponding message.

The user selected an institution Plaid does not support all requested products for and was shown a corresponding message.

The user selected an institution.

The user has submitted an account number. This event emits the `account_number_mask` metadata to indicate the mask of the account number the user provided.

The user has submitted credentials.

The user is being prompted to submit documents for an Income verification flow.

The user encountered an error when submitting documents for an Income verification flow.

The user has successfully submitted documents for an Income verification flow.

The user has submitted MFA.

The user has submitted an OTP code during the phone number verification flow. This event is only emitted in the Link Returning User Experience (Remember Me) or Layer flow. This event will not be emitted if the phone number is verified via SNA.

The user has submitted their phone number. This event is only emitted in the Link Remember Me flow.

The user has submitted a routing number. This event emits the `routing_number` metadata to indicate user's routing number.

The `TRANSITION_VIEW` event indicates that the user has moved from one view to the next.

The user has successfully verified their phone number using OTP or SNA. This event is only emitted in the Link Returning User Experience (Remember Me) flow or the Layer flow.

The user has viewed data types on the data transparency consent pane.

The `UNKNOWN` event indicates that the event is not handled by the current version of the SDK.

Map<String, Object>

An object containing information about the event.

String

The account number mask extracted from the user-provided account number. If the user-inputted account number is four digits long, `account_number_mask` is empty. Emitted by `SUBMIT_ACCOUNT_NUMBER`.

String

The error code that the user encountered. Emitted by: `ERROR`, `EXIT`.

String

The error message that the user encountered. Emitted by: `ERROR`, `EXIT`.

String

The error type that the user encountered. Emitted by: `ERROR`, `EXIT`.

String

The status key indicates the point at which the user exited the Link flow. Emitted by: `EXIT`.

String

The ID of the selected institution. Emitted by: _all events_.

String

The name of the selected institution. Emitted by: _all events_.

String

The query used to search for institutions. Emitted by: `SEARCH_INSTITUTION`.

String

Indicates if the current Link session is an update mode session. Emitted by: `OPEN`.

nullable, string

The reason this institution was matched. This will be either `returning_user` or `routing_number` if emitted by: `MATCHED_SELECT_INSTITUTION`. Otherwise, this will be `SAVED_INSTITUTION` or `AUTO_SELECT_SAVED_INSTITUTION` if emitted by: `SELECT_INSTITUTION`.

Optional<String>

The routing number submitted by user at the micro-deposits routing number pane. Emitted by `SUBMIT_ROUTING_NUMBER`.

String

The `link_session_id` is a unique identifier for a single session of Link. It's always available and will stay constant throughout the flow. Emitted by: _all events_.

String

If set, the user has encountered one of the following MFA types: `code` `device` `questions` `selections`. Emitted by: `SUBMIT_MFA` and `TRANSITION_VIEW` when `view_name` is `MFA`.

String

The request ID for the last request made by Link. This can be shared with Plaid Support to expedite investigation. Emitted by: _all events_.

String

The Auth Type Select flow type selected by the user. Possible values are `flow_type_manual` or `flow_type_instant`. Emitted by: `SELECT_AUTH_TYPE`.

String

An ISO 8601 representation of when the event occurred. For example `2017-09-14T14:42:19.350Z`. Emitted by: _all events_.

String

The name of the view that is being transitioned to. Emitted by: `TRANSITION_VIEW`.

The view showing Terms of Service in the identity verification flow.

The user has connected their account.

We ask the user to consent to the privacy policy.

Asking the user for their account credentials.

The view requesting Documentary Verification in the identity verification flow (configured via "Fallback Settings" in the "Rulesets" section of the template editor).

An error has occurred.

Confirming if the user wishes to close Link.

The user has authorized an instant micro-deposit to be sent to their account over the RTP or FedNow network with a 3-letter code to verify their account.

The view representing the "know your customer" step in the identity verification flow.

Link is making a request to our servers.

The user is asked by the institution for additional MFA authentication.

The user is asked to insert their account and routing numbers.

The user goes through the Same-Day Micro-deposits flow with Reroute to Credentials.

The user is informed they will authenticate with the financial institution via OAuth.

The user is asked to review their profile data in the Layer flow.

The user was presented with a Google reCAPTCHA to verify they are human.

The risk check step in the identity verification flow (configured via "Risk Rules" in the "Rulesets" section of the template editor).

The user has authorized a same day micro-deposit to be sent to their account over the ACH network with a 3-letter code to verify their account.

The watchlist screening step in the identity verification flow.

We ask the user to choose an account.

The user is asked to choose whether to Link instantly or manually (i.e., with micro-deposits).

The user is asked to select a brand, e.g. Bank of America. The brand selection interface occurs before the institution select pane and is only provided for large financial institutions with multiple online banking portals.

We ask the user to choose their institution.

The user is asked to select their saved accounts and/or new accounts for linking in the Link Returning User Experience (Remember Me) flow.

The user is asked to pick a saved institution or link a new one in the Link Remember Me flow.

The view in the identity verification flow which uses the camera to confirm there is a real user present that matches their ID documents.

The user is asked for their phone number in the Link Returning User Experience (Remember Me) flow.

The user is asked to upload documents (for Income verification).

The user is asked to verify their phone in the Link Returning User Experience (Remember Me) flow or Layer flow.

The SMS verification step in the identity verification flow.

nullable, String

The data directly returned from the server with no client side changes.

```kotlin
Plaid.setLinkEventListener { event -> Log.i("Event", event.toString()) }

```

```java
Plaid.setLinkEventListener(event -> {
  Log.i("Event", event.toString());
  return Unit.INSTANCE;
});

```

\=\*=\*=\*=

#### submit() 

The `submit` function is currently only used in the Layer product. It allows the client application to submit additional user-collected data to the Link flow (e.g. a user phone number).

**Properties**

object

Data to submit during a Link session.

String

The end user phone number.

String

The end user date of birth. To be provided in the format "yyyy-mm-dd".

```kotlin
val submissionData = SubmissionData(phoneNumber)
plaidHandler.submit(submissionData)

```

```java
SubmissionData submissionData = new SubmissionData(phoneNumber);
plaidHandler.submit(submissionData);

```

#### Upgrading 

The latest version of the SDK is available from [GitHub](https://github.com/plaid/plaid-link-android) . New versions of the SDK are released frequently. Major releases occur annually. The Link SDK uses Semantic Versioning, ensuring that all non-major releases are non-breaking, backwards-compatible updates. We recommend you update regularly (at least once a quarter, and ideally once a month) to ensure the best Plaid Link experience in your application.

SDK versions are supported for two years; with each major SDK release, Plaid will stop officially supporting any previous SDK versions that are more than two years old. While these older versions are expected to continue to work without disruption, Plaid will not provide assistance with unsupported SDK versions.

#### Next steps 

If you run into problems integrating with Plaid Link on Android, see [Troubleshooting the Plaid Link Android SDK](https://plaid.com/docs/link/android/troubleshooting/index.html.md) .

Once you've gotten Link working, see [Link best practices](https://plaid.com/docs/link/best-practices/index.html.md) for recommendations on further improving the Link flow.