Hmm scrub that.
Actually, it only works when testing in Chrome or IE
When I export to apk it thinks it's offline both when I try it your way and when I try it mine.
I assume something is not working in the browser wrapper.
I've tried adding website address to the allow intent, just in case.
Looks like it's back to my old way of testing e.g. grab a text file from my server, grab the value within and assign it to a global variable, check the global variable is not zero otherwise you are offline message.