title: Android no internet connection WITH uses permissions correct
body: <p>I'm writing my first app on android.</p>
  
  <p>While testing my jdbc connection on PC it's Ok, but on device it fails.
  I've made a check for internet </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>   public static boolean isInternetAvailable() {
          try {
              InetAddress ipAddr = InetAddress.getByName("google.com"); 
              return !ipAddr.equals("");
  
          } catch (Exception e) {
              return false;
          }
      }</code></pre>
  </div>
  </div>
  </p>
  
  <p>On PC (the same wifi network) it returns <code>True</code> and jdbc connects, but on android SDK 23 (Meizu pro6 device) it returns <code>False</code></p>
  
  <p>My Manifest:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="ibox.xobicity" &gt;
  
  
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/icon_app_xobi"
          android:label="@string/app_name"
          android:roundIcon="@drawable/icon_app_xobi"
          android:supportsRtl="true"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name=".MainActivity"
              android:label="@string/app_name"
              android:theme="@style/AppTheme.NoActionBar" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I've spend 3 hours of googling with no solution. 
  Thanks everybody in advance and sorry for my English. </p>