title: Android 6 Permission access to internet
body: <p>month ago I wrote my first app and I put permission to write on sd-card, when activity start i request permission i do:</p>
  
  <pre><code>if (permission != PackageManager.PERMISSION_GRANTED) {
  
      if (ActivityCompat.shouldShowRequestPermissionRationale(this,
                  Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
          AlertDialog.Builder builder = new AlertDialog.Builder(this);
          builder.setMessage("L'app richiede i permessi di scrittura")
                  .setTitle("Richiesta Permessi");
  
          builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
  
              public void onClick(DialogInterface dialog, int id) {
  
                  makeRequest();
              }
          });
  
          AlertDialog dialog = builder.create();
          dialog.show();
  
      } else {
          makeRequest();
      }
  }
  </code></pre>
  
  <p>this is <code>makeRequest()</code></p>
  
  <pre><code>private static final int REQUEST_WRITE_STORAGE = 112;
  private static String TAG = "PermissionDemo";
  
  protected void makeRequest() {
      ActivityCompat.requestPermissions(this,
              new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
              REQUEST_WRITE_STORAGE);
  }
  
  @Override
  public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
      switch (requestCode) {
          case REQUEST_WRITE_STORAGE: {
              if (grantResults.length == 0
                      || grantResults[0] !=
                      PackageManager.PERMISSION_GRANTED) {
  
                 //Log.i(TAG, "Permission has been denied by user");
  
                  finish();
              } else {
                  //Log.i(TAG, "Permission has been granted by user");
                  creaConfigurazioneIniziale();
              }
              return;
          }
      }
  }
  </code></pre>
  
  <p>Now my app have need permission for internet i have put this on manifest:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  </code></pre>
  
  <p>and this
      </p>
  
  <p>but don't work, what i can do to add permission for Internet and network?
  I have try to add <code>makereqeust</code> this:</p>
  
  <pre><code>protected void makeRequest() {
      ActivityCompat.requestPermissions(this,
              new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
              REQUEST_WRITE_STORAGE);
      ActivityCompat.requestPermissions(this,
              new String[]{Manifest.permission.INTERNET},
              REQUEST_WRITE_STORAGE);
      ActivityCompat.requestPermissions(this,
              new String[]{Manifest.permission.ACCESS_NETWORK_STATE},
              REQUEST_WRITE_STORAGE);
  }
  </code></pre>
  
  <p>but don't work. How i can do to solve problem?</p>