When a user authenticates with their bank via OAuth, the app opens Chrome. While Chrome is in the foreground, Android can kill the app to free memory. When the user finishes in Chrome and returns, the app cold-starts and the entire Plaid Link session is lost — no success callback, no exit callback, nothing.
Root cause
The Android plugin uses the legacy Plaid.create() + PlaidHandler.open() + onActivityResult pattern. This does not survive Android process death because the PlaidHandler instance and LinkResultHandler are held in memory and lost when the process is killed.
The native Plaid Android SDK provides FastOpenPlaidLink — an ActivityResultContract that integrates with AndroidX saved-state restoration and is designed to handle process death. The plugin should be updated to use this modern pattern instead of the legacy one.
Evidence
Dart layer (plaid_method_channel.dart:59-64): Calls _channel.invokeMethod('resumeAfterTermination', ...) — sends the method call to native.
iOS (PlaidFlutterPlugin.m:60-61, 236-245): Handles "resumeAfterTermination" in the method call switch → calls [_linkHandler resumeAfterTermination:redirectUriURL] on the native Plaid SDK. Fully implemented.
Android (PlaidFlutterPlugin.java:122-138): The onMethodCall switch handles "create", "open", "close", "submit" — no case for "resumeAfterTermination". Falls through to default: result.notImplemented().
However, even adding resumeAfterTermination to the Android side wouldn't help — the native Android Plaid SDK doesn't expose an equivalent method. The proper fix is migrating from the legacy pattern to FastOpenPlaidLink / ActivityResultContract.
Related
When a user authenticates with their bank via OAuth, the app opens Chrome. While Chrome is in the foreground, Android can kill the app to free memory. When the user finishes in Chrome and returns, the app cold-starts and the entire Plaid Link session is lost — no success callback, no exit callback, nothing.
Root cause
The Android plugin uses the legacy
Plaid.create()+PlaidHandler.open()+onActivityResultpattern. This does not survive Android process death because thePlaidHandlerinstance andLinkResultHandlerare held in memory and lost when the process is killed.The native Plaid Android SDK provides
FastOpenPlaidLink— anActivityResultContractthat integrates with AndroidX saved-state restoration and is designed to handle process death. The plugin should be updated to use this modern pattern instead of the legacy one.Evidence
Dart layer (
plaid_method_channel.dart:59-64): Calls_channel.invokeMethod('resumeAfterTermination', ...)— sends the method call to native.iOS (
PlaidFlutterPlugin.m:60-61, 236-245): Handles"resumeAfterTermination"in the method call switch → calls[_linkHandler resumeAfterTermination:redirectUriURL]on the native Plaid SDK. Fully implemented.Android (
PlaidFlutterPlugin.java:122-138): TheonMethodCallswitch handles"create","open","close","submit"— no case for"resumeAfterTermination". Falls through todefault: result.notImplemented().However, even adding
resumeAfterTerminationto the Android side wouldn't help — the native Android Plaid SDK doesn't expose an equivalent method. The proper fix is migrating from the legacy pattern toFastOpenPlaidLink/ActivityResultContract.Related