title: Android: How to list all the files in a directory in to an array?
body: <p>I have a variable "directorypath". It has the path to a directory in sd card. </p>
  
  <pre><code>Ex: "sdcard/images/scenes"
  </code></pre>
  
  <p>Now, I want to list all the files in the "directorypath" and want an Array to store all the file names in it. </p>
  
  <pre><code>Ex: Array[0]= Filename1, Array[1]= Filename2 Etc... 
  </code></pre>
  
  <p>I tried something like <code>Array[] myArray = directorypath.listfile();</code> but didn't work..! 
  Can anyone give me the code or at least help me? Much appreciated. </p>