title: android - cursor didn't have _data column not found
body: <p>When run below code to query a file on sdcard, I always get a null.</p>
  
  <pre><code>public String getRealPathFromURI(Context context, Uri uri)
  {
      String fileName="unknown";
      if (uri.getScheme().toString().compareTo("content") == 0)
      {
          Cursor cursor = context.getContentResolver().query(uri,null,null,null,null);
          if (cursor.moveToFirst())
          {
              Log.e(TAG, "dump cursor:" + DatabaseUtils.dumpCursorToString(cursor));
              int column_index = cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA);
              String name = cursor.getString(column_index);
              if (name != null) {
                  uri = Uri.parse(cursor.getString(column_index));
                  fileName = uri.getLastPathSegment().toString();
              }
          }
      }else if (uri.getScheme().compareTo("file") == 0){
          fileName = uri.getLastPathSegment().toString();
      }else {
          fileName = fileName + "_" + uri.getLastPathSegment();
      }
      Log.e(TAG,"fileName:" + fileName);
      return fileName;
  }
  </code></pre>
  
  <p>The media file test.mp3 has been pushed to sdcard and I can find it from the database.</p>
  
  <p>Then from the cursor dump, I found it actually didn't contain _data field.</p>
  
  <pre><code>11138 09-18 16:14:53.881 27848 27848 E MyExam  : dump cursor:&gt;&gt;&gt;&gt;&gt; Dumping cursor android.content.ContentResolver$CursorWrapperInner@9ab47b6
  11139 09-18 16:14:53.881 27848 27848 E MyExam  : 0 {
  11140 09-18 16:14:53.881 27848 27848 E MyExam  :    document_id=primary:test.mp3
  11141 09-18 16:14:53.881 27848 27848 E MyExam  :    mime_type=audio/mpeg
  11142 09-18 16:14:53.881 27848 27848 E MyExam  :    _display_name=test.mp3
  11143 09-18 16:14:53.881 27848 27848 E MyExam  :    last_modified=1441221715000
  11144 09-18 16:14:53.881 27848 27848 E MyExam  :    flags=70
  11145 09-18 16:14:53.881 27848 27848 E MyExam  :    _size=14400116
  11146 09-18 16:14:53.881 27848 27848 E MyExam  : }
  11147 09-18 16:14:53.881 27848 27848 E MyExam  : &lt;&lt;&lt;&lt;&lt;
  </code></pre>
  
  <p>I am using android L.</p>
  
  <p>But database really has _data field. why I can not query it by resolver?</p>