Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (webview)
Viewing all articles
Browse latest Browse all 680

Open external urls within webview with remote content

$
0
0

I have created an app which basically just wrapps a whole web site which is responsive. Everything works great except one thing! External links will open in the webview,but I need them to open in Safari. I thought that I could just trigger an event on the html page for all external urls, like this:

Titanium.App.fireEvent('openURL', { url: href });

And then inside my titanium js file:

Ti.App.addEventListener("openURL", function(){
     Ti.Platform.openUrl(e.url);
});
But apparently, Titanium isn't injected in remote content, only local. So how would I solve this? This must be a very common thing to do and with web apps becoming more popular, this would be a big problem if it doesn't work in Titanium.

Any ideas?


Viewing all articles
Browse latest Browse all 680

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>