在安卓中使用Plaid SDK时未收到成功回调

4

我在我的Android应用程序中使用版本为0.3.0的Plaid SDK。

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

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

我只创建了一个MainActivity作为重定向活动。

===== 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

谢谢您提前的帮助。

1个回答

1

问题已解决,通过更新Plaid SDK版本至0.3.1实现。

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

在Plaid文档网站上,他们仍然保留旧版本,请更新版本到0.3.1。
新版本可以接收所有回调。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接