Skip to content

[SDK 6.0.0] Hardware back button does not dismiss LinkActivity #342

Description

@mzdon-cg

The problem

In SDK 6.0.0, pressing the hardware back button while LinkActivity is displayed does not dismiss it after some progress has been made through the Plaid Layer flow. The back button appears to do nothing — the Layer UI stays on screen and the activity result is never delivered to the host activity.

This is a regression from 5.x, where back correctly dismissed the activity and delivered a LinkExit result.

Environment

Generic Android 17 emulator

Steps to Reproduce

  1. Launch any standard Plaid Layer session (Plaid.createPlaidLayerSession)
  2. Once the Plaid session is visible, press the hardware back button immediately, back dismisses correctly
  3. Launch the session again
  4. Tap any UI element inside the session to progress through the Layer flow
  5. Press the hardware back button, back does not dismiss; Plaid session stays on current screen

The issue does not reproduce with sdk-core:5.5.2.

Expected Result

Pressing the hardware back button while Plaid session is displayed should dismiss it.

Screenshots

Screen.Recording.2026-07-15.at.5.56.25.AM.mov

Logs

No logs emitted when pressing back.

Code To Reproduce Issue

override suspend fun openLayer(token: String, phoneNumber: String): PlaidLinkOutcome {
    val outcome = CompletableDeferred<PlaidLinkOutcome>()
    val handshake = CompletableDeferred<Boolean>()
    pendingResult = { outcome.complete(it) }
    // layerHandshake.complete(true) called when LinkEventName.LAYER_READY event received
    layerHandshake = handshake
    startListening()

    val handler =
      Plaid.createPlaidLayerSession(
        context = context,
        configuration = LayerTokenConfiguration.Builder().token(token).build(),
      )
    handler.submit(SubmissionData(phoneNumber = phoneNumber))

    when (handshake.await()) {
      true -> {
        launcher?.launch(handler)
        outcome.await()
      }

      false -> outcome.await()
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions