title: How to add Internal and External storage to File Chooser in android
body: <p>My sample app is open file chooser and select file / directory then getting the path into EditText, I tried the methods in this <a href="https://stackoverflow.com/questions/7856959/android-file-chooser">question</a> and I reached to this result</p>
  
  <pre><code>    public class MainActivity extends AppCompatActivity {
      private Button browse;
      private EditText editTextPath;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          browse = (Button) findViewById(R.id.browse);
          editTextPath = (EditText) findViewById(R.id.path);
          browse.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
                  intent.setType("*/*");
                  intent.addCategory(Intent.CATEGORY_OPENABLE);
                  startActivityForResult(Intent.createChooser(intent,"Select file or dir"), 1);
                  setResult(Activity.RESULT_OK);
              }
          });
  
  
      }
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
          if (requestCode == 1 &amp;&amp; resultCode == Activity.RESULT_OK) {
              String Fpath = data.getDataString();
              editTextPath.setText(Fpath);
          }
  
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/y1wPQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y1wPQ.png" alt="AndroidFileChooser"></a></p>
  
  <p>I want to add internal and external storage like this to file chooser</p>
  
  <p><a href="https://i.stack.imgur.com/ag5pR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ag5pR.png" alt="AndroidFileChooser2"></a></p>