Search code examples
javaandroidhybrid

I'm working on a Hybrid app in which I'm loading HTML content in a web view inside a dialog."span" has the url value.help me


Document html= (Document) Jsoup.parse(htmlContent);

span = ((org.jsoup.nodes.Document) html).body(). getElementsByAttribute("data-tap-action- url").get(0).attr("data-tap-action-url");

Code for opening my inbuilt browser

if (span.startsWith("http"))

{

invokeChildBrowser(span);

}


Solution

  • You should use a Cordova/phonegap webview and a plugin for opening URLs (e.g: InAppBrowser), otherwhise your link will be broken or will be opened in the dialog