Open Default File Manager in android?

Bala picture Bala · Jul 30, 2012 · Viewed 24.8k times · Source

My Android Device contains Default File Manager and a Button (Open). How to open the file manager when I click the button?

Answer

rfsbraz picture rfsbraz · Jul 30, 2012

Try something like this in your button listener:

openButton.setOnClickListener(new OnClickListener() {

   @Override
   public void onClick(View v) {
      Intent intent = new Intent();
      intent.setAction(Intent.ACTION_GET_CONTENT);
      intent.setType("file/*");
      startActivity(intent);
   }
}