我在我的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
谢谢您提前的帮助。