Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect android webview URL location change

Does anyone else know how to track a sort of webview "onLocationChange"? iOS has something like this for its webview.

PS - I am trying to see if I can use the phonegap childbrowser plugin on android to do facebook auth. I'm giving up and just using a facebook plugin I found that uses part of the FB android SDK, but I'd still like to know what's possible.

like image 716
Brenden Avatar asked Mar 04 '11 10:03

Brenden


1 Answers

If you want to manipulate the URL then override this:

public boolean shouldOverrideUrlLoading (WebView view, String url)

Give the host application a chance to take over the control when a new url is about to be loaded in the current WebView.

[WebViewClient Reference]

like image 72
Matthias Avatar answered Nov 02 '22 22:11

Matthias