Unable to check the Internet Available : <p>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 <a href="https://stackoverflow.com/questions/38038301/how-to-check-internet-connection-in-android-webview-and-show-no-internet-image-n">Link1</a>and <a href="https://stackoverflow.com/questions/29294907/check-whether-connected-to-the-internet-or-not-before-loading-webview">link2</a>. I am confused how to do this.
Here is my code</p>

<pre><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");
}
</code></pre>
