webview show no internet connection dialog if the is no internet connection

0
Musa Abdullahi | 28 xp

Please i need help, I have an Android app which has a web-view. When there’s no Internet connection, web-view will display page not available. I want to make this look like an app as much as possible, so I don’t want to display this page.i want my app to display dialog alert if there is no Internet connection or network lost . here is my source code below

MainActivity.java

0
Kanthikiran_Nalamati | 76 xp

its easy only..first check the internet connection by using connecivity manager..and create alertdailog and call in that connectivity manager

0
Kprabhu Got | 158 xp

0
Kprabhu Got | 158 xp

Use this method to check internet connection before loading url