I can’t get a website to display properly as it requires Java. I can not figure out how to get Java to run inside a webView. Help would be appreciated.
local webView = native.newWebView( 0, 0, display.contentWidth, display.contentHeight ) webView.x = display.contentWidth \* 0.5 webView.y = display.contentHeight \* 0.5 webView:request( "http://keephd.com/about/" ) local function webListener( event ) if event.url then print( "You are visiting: " .. event.url ) end if event.type then print( "The event.type is " .. event.type ) -- print the type of request end if event.errorCode then native.showAlert( "Error!", event.errorMessage, { "OK" } ) end end -- Called when a key event has been received. local function onKeyEvent( event ) -- Print which key was pressed down/up to the log. local message = "Key '" .. event.keyName .. "' was pressed " .. event.phase print( message ) if (system.getInfo("platformName") == "Android") then if (event.keyName == "back") and (event.phase == "down") then webView:back() return true end end -- Return false to indicate that this app is \*not\* overriding the received key. -- This lets the operating system execute its default handling of this key. return false end -- Add the key event listener. Runtime:addEventListener( "key", onKeyEvent ); webView:addEventListener( "urlRequest", webListener )