title: Android read file path from URI return null
body: <p>I'm trying to pick file from <code>sd-card</code> or other path which user like to do that, in this my code get file path from uri return null and i can't resolve this problem. I'm using android default file manager to pick file</p>
  
  <pre><code>@Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      if (requestCode == REQUEST_CODE_PICK_VIDEO &amp;&amp; resultCode == Activity.RESULT_OK) {
          Uri uri = data.getData();
          Log.e("", "Video URI= " + getRealPathFromURI(context, uri));
      }
  }
  
  public String getRealPathFromURI(Context context, Uri contentUri) {
      Cursor cursor = null;
      try {
          String[] proj = {MediaStore.Images.Media.DATA};
          cursor = context.getContentResolver().query(contentUri, proj, null, null, null);
          int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
          cursor.moveToFirst();
          return cursor.getString(column_index);
      } finally {
          if (cursor != null) {
              cursor.close();
          }
      }
  }
  </code></pre>