I am about to launch a simple web based app. Actually it’s entirely web based so I hope Apple does not reject it on that base
The app, aside from loading a jquery mobile mini-site, has links to send an email (mailto:), make a phone call (tel:), view a google map (geo: for android) and launch the full site (corona:fullsite).
Due to the nature of native webviews, one needs to launch these links externally or the user has no way of navigating back to the webapp and also the history on the jquery mobile app breaks.
On iOS this is no problem. The webpopup on iOS ignores any URI scheme other than http: (apart from tel:) or the pseudo link corona:whatever.
This way, I can intercept those links from the webpopup listener function and launch those links using system.openURL()
The issue comes on Android. Android does not recognize those links (not even tel:) but yet the webview follows the link - which results in a broken black page. Then the listener launches the link from Corona correctly, but when the user goes back the app is stuck on that awful black page until the back button is clicked 2 or 3 times.
This is so no acceptable that I had to resort to learn how to code a simple webview based app in Java, which was the least of my intentions. Only to set up the programming environment in Eclipse took me 2 days. This made me appreciate Corona’s ease and speed even more.
My request to Ansca: can you guys please please implement something like shouldOverrideUrlLoading(WebView view, String url) in Java for the webview component on Android? If the passed url has an http(s) URI scheme then follow it, otherwise don’t do anything for any other type of URI scheme or pseudo link and leave it to the Corona listener to handle what to do. I’d even be happy enough if it was only on pseudo links as long as the link reaches the webpopup listener.
This simple update would make the webview component in Corona actually usable in cross-platform web based apps. If you do this, I can maybe contribute a better sample app for the webpopup component, showing how to launch a call and get back to the app, launch an email popup, launch a map in the google map app and launch a URL into the browser - all from links within an HTML page, may that be local or online.
I think it’d help the community, but it needs to works on both platforms. [import]uid: 68130 topic_id: 20672 reply_id: 320672[/import]