Код: Выделить всё
private const val RETURN_URI = "myapp://revolut-pay"
< /code>
in androidmanifest.xml: < /p>
< /code>
В SDK init: < /p>
RevolutPayments.revolutPay.init(
environment = RevolutPayEnvironment.MAIN,
returnUri = Uri.parse("myapp://revolut-pay"),
merchantPublicKey = "...",
requestShipping = false,
customer = Customer("", "", "", null, null))
< /code>
in mainActivity: < /p>
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
handleDeepLink(intent)
}
private fun handleDeepLink(intent: Intent?) {
intent?.data?.let { uri ->
try {
RevolutPayments.revolutPay.handle(uri)
} catch (e: Exception) {
Log.e("RevolutDeepLink", "Error handling URI", e)
}
}
}
< /code>
После обработки платежа через Webview Swarkback (приложение Revolut не установлено), приложение сразу же сбоя при запуске с помощью: < /p>
java.lang.UnsupportedOperationException: This isn't a hierarchical URI.
at android.net.Uri.getQueryParameterNames(Uri.java:1619)
at com.revolut.revolutpay.domain.f.b(Unknown Source:5)
at com.revolut.revolutpay.ui.webview.c.b(Unknown Source:7)
at com.revolut.revolutpay.ui.webview.b.a(Unknown Source:6)
at com.revolut.revolutpay.ui.webview.WebViewConfirmationActivity$b.shouldOverrideUrlLoading(Unknown Source:14)
at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(chromium-TrichromeWebViewGoogle6432.aab-stable-720416833:115)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:186)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
это ошибка в револютной SDK? < /p>
Подробнее здесь: https://stackoverflow.com/questions/797 ... d-return-u