title: Cursor for listview in a fragment
body: <p>How can i use a cursor inside a fragment? 
  Here is the snippet of a cursor i want to setup but it says managedQuery is undefined:</p>
  
  <p>Fragment1.java</p>
  
  <pre><code>private List&lt;String&gt; getMp3FilesFromSDCard() {
      //here we get the list of songs stored on the SD card and we update our singleton class     
          List&lt;String&gt; result = new ArrayList&lt;String&gt;();
  
          SingletonPlaylist playlist;
  
          playlist = SingletonPlaylist.getInstance();
  
          Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
          Cursor cursor;
          String[] projection = 
          {
              MediaStore.Audio.Media._ID,
              MediaStore.Audio.Media.ALBUM,
              MediaStore.Audio.Media.ARTIST,
              MediaStore.Audio.Media.TITLE,
              MediaStore.Audio.Media.DATA,
              MediaStore.Audio.Media.DISPLAY_NAME
          };
  
          String selection = MediaStore.Audio.Media.IS_MUSIC + " != 0";
  
  
          cursor = this.managedQuery(uri, projection, selection, null, null);
  
          cursor.moveToFirst();
  
          while (cursor.moveToNext())
          {
              result.add(cursor.getString(5));
              playlist.addSong(new Song(cursor.getString(0),cursor.getString(1),cursor.getString(2),cursor.getString(3),cursor.getString(4),cursor.getString(5)));
          }
  
  
          return result;
      }
  </code></pre>
  
  <p>How can i fix this? </p>