title: Listfiles() in android is not working
body: <p>Im developing a Music player for which I need to retrieve all mp3 files from my storage. Im using getExternalStorageDirectory() function to obtain the external storage directory. But When I tried listfiles() on this path,its returning a null object. Im using a API Level 21 . And I have already gave
   uses-permission in android manifest
  both for reading and writing external storages,Even after doing this Im getting a null object.</p>
  
  <p>Code:</p>
  
  <blockquote>
    <p>File root= new
    File(Environment.getExternalStorageDirectory().getPath());</p>
    
    <p>Log.v("file exists ", root.exists()+""); Log.v(" file is</p>
    
    <p>a directory",root.isDirectory()+""); Log.v("file can be
    read",root.canRead()+""); Log.v("listfile value",root.listFiles()+"");</p>
  </blockquote>
  
  <p>Outputs:</p>
  
  <p>1.True
  2.True
  3.False
  4.null</p>
  
  <p>Directory is exists( I checked using isDirectory and exists() functions )
  But canRead() function is returning false value, which means I dont have authority to read the directory, How to correct this?
  Any solution?
  Thanks in advance.</p>