android - 在 Android 中未收到带有 android plaid sdk 的成功回调
问题描述
我在我的 android 应用程序中实现了 plaid sdk 版本 - 0.3.0
单击最后一个屏幕“继续”按钮后,我没有收到成功或任何回调。
单击“继续”后,我得到了 onActivityResult() 的回调,结果代码=0,但与任何格子结果代码无关。
我只创建了一个 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
在此先感谢,请帮助。
解决方案
它通过将格子 sdk 版本更新到 0.3.1 来解决
dependencies {
implementation 'com.plaid.link:sdk-core:0.3.1'
}
在 Plaid 文档网站上,他们仍然保留旧版本,请将版本更新到 0.3.1。
使用新版本,它接收所有回调
推荐阅读
- c# - 编写并链接到一个通用的配置文件
- c++ - 从构造的 Flatbuffer 访问字段值原始字节
- swift - Swift - 替换字符串中完全匹配的字符/单词(不包含)
- php - php 图片上传 - 如果未选择图片,如何上传替代/默认图片
- python - 优化高斯过程回归的超参数时的不同结果
- mysql - Sequelize:深度人口关联连接查询
- angular - Angular 8 415 不支持的媒体类型,不支持内容类型“应用程序/json”+Spring Boot
- c# - 使用 Excel 2013 和 C# 时如何解决此错误(它与“.xls”完美配合)?
- flutter - 如何隐藏我的颤振插件的源代码,以便在使用时没有人可以看到相同的内容?
- node.js - 使用 CMD 向节点进程添加环境变量