title: How to check if the Internet connection (Wifi/Mobile data) is ENABLED?
body: <p>How to check if the internet connection is Enabled in Android? Like if the LOCATION SERVICE is disabled we use the technique </p>
  
  <pre><code>Location myLocation = locationmanager.getLastKnownLocation(provider);
  if(myLocation == null){
        Show the AlertDialog.
  }else{
  do this.
  }
  </code></pre>
  
  <p>Like this, how do i check if the Internet connection is Enabled/Disabled.</p>