title: Android - How to get selected file name from the document
body: <p>I am launching the intent for selecting documnets using following code.</p>
  
  <pre><code>private void showFileChooser() {
      Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
      intent.setType("*/*");
      intent.addCategory(Intent.CATEGORY_OPENABLE);
  
      try {
          startActivityForResult(
                  Intent.createChooser(intent, "Select a File to Upload"), 1);
      } catch (android.content.ActivityNotFoundException ex) {
          // Potentially direct the user to the Market with a Dialog
          Toast.makeText(this, "Please install a File Manager.",
                  Toast.LENGTH_SHORT).show();
      }
  }
  </code></pre>
  
  <p>In onActivity results when i am trying to get the file path it is giving some other number in the place of file name.</p>
  
  <pre><code>    @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      switch (requestCode) {
      case 1:
          if (resultCode == RESULT_OK) {
              // Get the Uri of the selected file
              Uri uri = data.getData();
              File myFile = new File(uri.toString());
              String path = myFile.getAbsolutePath();
          }
          break;
      }
      super.onActivityResult(requestCode, resultCode, data);
  }
  </code></pre>
  
  <p>That path value i am getting like this.
  "content://com.android.providers.downloads.documents/document/1433"
  But i want real file name like doc1.pdf etc.. How to get it?</p>