titanium - Custom error "webpage not available” in android -


i having trouble connecting internet while using home wifi connection. error comes on screen 'web page not available'.how can customize page possible!

you can check network connectivity in oncreate before loading webview. if connectivity available, load url in webview, else show custom dialog no connection available.

connectivitymanager connectivitymanager = (connectivitymanager)     c.getsystemservice(context.connectivity_service); if (connectivitymanager != null) {     networkinfo network = connectivitymanager.getactivenetworkinfo();     if (network.getstate() != networkinfo.state.connected) {         // record fact there not connection         isconnectivity = false;     } }  if(isconnectivity) {     //load url in webview } else {     //show custom dialogbox } 

hope helps.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -