title: Always getting intent chooser resultcode as RESULT_CANCELLED and data as null
body: <p>I'm new in Android Programming and this my very first app. I'm getting a problem with intents. File chooser is returning <strong>data</strong> value as <strong>null</strong> and also <strong>resultCode</strong> as <strong>-1</strong>. Though I'm getting requestCode as given.</p>
  
  <p>I have tried couple of solutions as followed:  </p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/questions/18512264/fragments-startactivityforresult-always-return-resultcode-0-and-intent-null-on-c">1</a><br>
    <a href="https://stackoverflow.com/questions/4898053/android-getting-result-canceled-when-i-specifically-add-result-ok">2</a></p>
  </blockquote>
  
  <p>I'm trying to implement <a href="https://stackoverflow.com/questions/22619325/android-directory-and-file-chooser-android-library">this</a> code.</p>
  
  <h3>**EDIT**</h3>
  
  <p>My code so far is: <a href="http://pastebin.com/y8zT4VHz" rel="nofollow noreferrer">here</a></p>