Luciano
Luciano

Reputation: 2798

How to catch a website redirect in a webview

I'm trying to setup inapp PayPal MECL transactions.

After the transaction is completed or failed, PayPal will redirect to a fail url or transaction completed url..

How can i catch that url to see if the transaction is completed?

Upvotes: 0

Views: 1643

Answers (1)

neteinstein
neteinstein

Reputation: 17613

Multiple options

Intent Filter:

  <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>

As described here: https://groups.google.com/forum/#!topic/android-developers/C6qNOBULpCc And official docs here: http://developer.android.com/guide/topics/manifest/intent-filter-element.html

Or WebViewClient:

Clicking URLs opens default browser

Upvotes: 2

Related Questions