2011-12-21 35 views
0

我試圖設置inapp PayPal MECL事務。如何在webview中捕捉網站重定向

交易完成後還是失敗,PayPal將重定向到URL失敗或交易完成網址..

我怎樣才能趕上網址,看是否交易完成?

+1

使用與您的網址匹配的意圖過濾器 – njzk2

+0

thnx,我認爲這將解決我的問題 – Luciano

+0

你使用的是服裝的webview? – Arslan

回答

2

多個選項

意圖過濾器:

<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

Clicking URLs opens default browser