3.2.4
Features
Kotlin 1.4.30 support
👀 API Preview
Added support for the new ActivityResultContract API that got introduced in androidx.fragment 1.3.0.
This new Plaid API is still under consideration and hence you need to opt-in using the
@OptIn(PlaidActivityResultContract::class)
annotation.
First ensure to register a callback for an Activity Result when your Fragment/Activity gets created, for instance as a class member:
@OptIn(PlaidActivityResultContract::class)
private val linkAccountToPlaid = registerForActivityResult(OpenPlaidLink()) {
when (it) {
is LinkSuccess -> handleSucces(it)
is LinkExit -> handleExit(it)
}
}
Then launch Plaid Link by calling launch
with a LinkTokenConfiguration
:
linkAccountToPlaid.launch(config)
Note that this new API only supports
LinkTokenConfiguration
and notLinkPublicKeyConfiguration
. You can check our Link token migration guide on how to start using Link tokens.
For more information about the new Android ActivityResultAPI, have a look at the official Android Activity Result documentation