android - 在 Android 中使用 android plaid sdk 未收到成功回调

标签 android kotlin callback onactivityresult plaid

我在我的 android 应用程序中实现了 plaid sdk 版本 - 0.3.0

点击最后​​一个屏幕的“继续”按钮后,我没有收到成功或任何回调。

点击“继续”后,我收到带有 resultCode=0 的 onActivityResult() 回调,但与任何 Plaid Result 代码无关。

我只创建了一个 Activity 作为 MainActivity,并将其用作 Redirected Activity。

=====AndroidManifest.xml =====

    <activity android:name=".MainActivity" android:launchMode="singleInstance">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />

                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>

                <intent-filter android:autoVerify="true">
                    <action android:name="android.intent.action.VIEW" />
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
                    <data
                        android:host="plaid-redirect"
                        android:scheme="plaidtestapp" />
                </intent-filter>
            </activity>
<activity android:name="com.plaid.link.LinkActivity" />

===== MainActivity.kt =====

val intent = Intent(this, LinkActivity::class.java)
intent.putExtra( Plaid.LINK_CONFIGURATION,
LinkConfiguration(
// required
clientName = "Plaid Test App",
products = listOf(PlaidProduct.TRANSACTIONS),
webviewRedirectUri = "plaidtestapp://plaid-redirect",
// optional
environment = PlaidEnvironment.SANDBOX, // Defaults to plaid options value if set or SANDBOX
language = Locale.ENGLISH.language, // Defaults to English
countryCodes = listOf(Locale.US.country), // Defaults to US
webhook = "https://requestb.in",
userEmailAddress = "{registered email id}",
userLegalName = "{registered email id}",
userPhoneNumber = "{phone number}") )
startActivityForResult(intent, LINK_REQUEST_CODE)

引用 Github 链接 https://github.com/plaid/plaid-link-android

提前致谢,请帮忙。

最佳答案

通过更新plaid sdk版本到0.3.1解决

dependencies {
  implementation 'com.plaid.link:sdk-core:0.3.1'
}

在 Plaid 文档网站上,他们仍然保留旧版本,请更新版本到 0.3.1。

新版本接收所有回调

关于android - 在 Android 中使用 android plaid sdk 未收到成功回调,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59304668/

相关文章:

android - 在显示 UI 的 android 服务中检测 'home button pressed' 事件(类似于 facebook 聊天头)

android - StackMob 或 Server (MySql) 来处理用户帐户

generics - 具有通用参数和使用类型参数的方法的 Kotlin 抽象类

java - 如何处理从 Java 到 Kotlin 的通用列表转换?

android - Firebase Firestore 回收器 View 适配器为每个文档复制列表

node.js - 如何在 NodeJS 中使用 Promises(Bluebird) 处理条件回调

android - Android 应用程序中的选项菜单布局

java - 返回从外部函数的内部回调中获得的字符串

javascript - jQuery 回调仅在某种程度上执行

android - 通过随机键检索子值-Firebase