Android Question webview links to open in safari

Discussion in 'Android Questions' started by cengolo, Feb 18, 2015.

  1. cengolo

    cengolo Member Licensed User

    Hi,

    I am developing a wrapper app which only contains a webview and loads the pages from my server. I want some of the links to open in Safari, not inside the webview (kind of target=_blank). How can I do it? Do I need to alter the code, or alter the HTML markup?


    Best

    cenk
     
  2. KZero

    KZero Active Member Licensed User

    select Phone library from Libs tab and try this code

    Code:
    Sub WebView1_OverrideUrl (Url As StringAs Boolean
    If Url="http://www.google.com" Then
        
    Dim p As PhoneIntents
        
    StartActivity(p.OpenBrowser(Url))
        
    Return True
    End If
    End Sub
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice