Hi everyone,
I’m developing a simple wrapper using Corona SDK, which opens up my html5 app using native.newWebView(). This works fine except for the fact that the appcache feature does not seem to work. I’m testing this on an actual device since the simulator doesn’t have webviews, and my app works perfectly within Chrome on Android, so I’m pretty sure I have all the correct syntax in my html files as well as in my manifest file. I’ve checked to see that my webserver is serving the correct mime type for .appcache files also. If an internet connection isn’t available, rather than loading the cached version, the webview just shows a “Webpage not available” screen with the error net::ERR_ADDRESS_UNREACHABLE or net::ERR_NAME_NOT_RESOLVED. Is there some way to make the webview operate like Chrome does?
Thanks so much for any help you give me, I’ve been racking my brain about this forever and for the life of me can’t understand why this wouldn’t work.
Here’s the relevant part of my main.lua (pretty simple):
display.setDefault(“background”,0/255,0/255,0/255)
webView = native.newWebView( display.contentCenterX, display.contentCenterY, 320, 470 )
webView:request( “http://my-app.com/app.php” )
And here’s my manifest file, included with: [html manifest=“ts_manifest.appcache”]
CACHE MANIFEST
#2
offline_view.html
NETWORK:
*
http://*