title: Choose a text file and then read it on Android Platform
body: <p>My android app has a Button widget, wherein I have written the following inside the file <code>activity_main.xml</code>, apart from other necessary text. </p>
  
  <pre><code>&lt;Button
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:text="Numbers"
     android:id="@+id/btnBrowse"
     android:onClick="clickButtonBrowse"
   /&gt;
  </code></pre>
  
  <p>In the file <code>MainActivity.java</code> apart from the other functions, I wrote the following: </p>
  
  <pre><code>protected void clickButtonBrowse() {
      Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
      intent.addCategory(Intent.CATEGORY_OPENABLE);
      intent.setType("text/plain");
      startActivity(intent, FILE_REQUEST_CODE);
  }
  </code></pre>
  
  <p>My idea is to open a file browser, and select a file. I have taken the help from this question <a href="https://stackoverflow.com/questions/9923760/how-to-use-intent-for-choosing-file-browser-to-select-file" title="on selecting a file">on selecting a file</a>.</p>
  
  <p>Now I have no idea on the following: </p>
  
  <ol>
  <li>How to get the name of the file from the intent, so that I can read it. </li>
  <li>How is this <code>FILE_REQUEST_CODE</code> to be defined? What are the permissible values? </li>
  </ol>
  
  <p>Could you help me?</p>