我正在尝试设置应用内 PayPal MECL 交易。
交易完成或失败后,PayPal 将重定向到失败的 url 或交易完成的 url..
我如何获取该 url 以查看交易是否已完成?
最佳答案
多个选项
Intent 过滤器:
<activity android:name=".ActivityTest">
<intent-filter><action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="www.mywebsite.com" android:scheme="http"></data>
</intent-filter>
</activity>
如此处所述:https://groups.google.com/forum/#!topic/android-developers/C6qNOBULpCc 官方文档在这里:http://developer.android.com/guide/topics/manifest/intent-filter-element.html
或者WebViewClient:
关于android - 如何在 webview 中捕获网站重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8588071/