-1

I just started creating an android app with a WebView.

I have loaded urls successfully, but I would like to display cached pages & a popup dialog that says, "No Internet Connection" when the user does not have an internet connection.

Please help me with this code.

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
  • Can you open and see the webpage when you are offline? In webview also you are just going to load the webpage, then how it become possible? – Sridhar Aug 28 '15 at 16:34

1 Answers1

0

Breaking this down, you need to different things:

  • Detecting if the user has an internet connection
  • Displaying a pop up dialog

Here are two helpful posts that describe the above tasks:

Hope this helps, good luck :-)

Community
  • 1
  • 1
Alex Crist
  • 1,059
  • 2
  • 12
  • 22
  • Hi Alex, Thx for the link. I made the changes. the problem is when i disconnect data enabled in moblie networking, i can see "Webpage not available" which is not good. I dont want to show this kind of page to my users, if internet connections not available i want to show some page or popup alert to the users like "Check the internet connection" how it is possible ? – Sriraam Aug 29 '15 at 07:55