title: Reading a text file dynamically on user selection in Android
body: <p>I am building an android application that reads text files.
  Now,i have multiple text files in the sdcard .
  Location of files is /sdcard/textfile/<br>
  filenames:     abc.txt
  def.txt
  ghi.txt</p>
  
  <p>i want that when users select any one of the file,the selected file should be read.
  i know the code to read a single file
  i.e</p>
  
  <pre><code>File sdcard = Environment.getExternalStorageDirectory();
  File file = new File(sdcard,pathtofile);
   BufferedReader br = new BufferedReader(new FileReader(file));
  </code></pre>
  
  <p>pathtofile stores the path to file abc.txt that is defined .</p>
  
  <p>Is there any way i can pass the filepath to file object for the file that user selected
  currently,it works for abc.txt as i have defined its path in pathtofile</p>