WebView overrideUrl not working in Honeycomb

quique

Member
Licensed User
Longtime User
Hi! Anyone have the same problem as me ? or any hint at it ?

I have an app with a webview, which uses overrideurl. It works as intended on android 2.x .. but in android 3.x the overrideurl is not working, thus the user navigates into any link that appears on the webview.

I am wondering if this is a known bug, or there is something weirder going on.

Regards,

Enrique
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've tested the following code on Android 3.1 and it works properly:
B4X:
Sub Globals
   Dim wv As WebView
   
End Sub

Sub Activity_Create(FirstTime As Boolean)
   wv.Initialize("wv")
   Activity.AddView(wv, 0, 0, 300dip, 300dip)
   wv.LoadUrl("http://www.b4x.com")
End Sub
Sub wv_OverrideUrl (Url As String) As Boolean
   Log(Url)
   Return True
End Sub
 
Upvote 0

quique

Member
Licensed User
Longtime User
Hi Erel! Thanks for your concern. Maybe this can throw some light: As I am experimenting with my problem, I think this behavior is happening only with links inside flash objects.

In Android 2.3, given a webpage with a flash object inside, if the flash includes a link to a third party webpage and the user clicks on it, the webview invokes the overrideurl as espected.

I am not having the same behavior on an asus Transformer Tablet. (honeycomb 3.x): the webview (I think it is the webview) follows the link without invoking the override function.

I don't know that much about the inner workings of flash / webviews: Maybe the flash client uses an intent or something similar and just starts its own webview, in honeycomb.

Regards,

Enrique
 
Upvote 0
Top