I am working on an android application that have a web-view. The problem comes when I want to check whether Internet is available before displaying default message. I have studied these links Link1and link2. I am confused how to do this. Here is my code
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Web= findViewById(R.id.webview);
Web.getSettings().setJavaScriptEnabled(true);
Web.loadUrl("http://yourconsenthomebuilders.com/app/clients");
}