I have an app that runs well with iOS, but I can't seem to get the same results with Android. Here is the error I see when trying to load the app:
[INFO][TiWebChromeClient.console( 1055)] (main) [2966,31801] ReferenceError: Can't find variable: URL
Here is the syntax that loads the webView:
var mainWindow = Ti.UI.createWebView({
url: 'v.1.3/myHome.html',
backgroundColor: '#F8F8F8 ',
top:40,
disableBounce:true,
})
mainWindow.addEventListener('load', function(e)
{
mainWindow.evalJS("var URL='" + Titanium.App.Properties.getString('URL') + "';");
})
I have also tried changing load to before load with no results. I have cleaned and rebuilt the project; also with no luck.
I am running on Titanium 2.1 using the latest SDK (installed this morning). I have tried using Android 2.3,3, and 4, all not working properly.
I also can't seem to fire events from this webview (using Ti.App.fireEvent).
Help is greatly appreciated.