Open Default File Manager in android?
-
23-06-2021 - |
Question
My Android Device contains Default File Manager and a Button (Open). How to open the file manager when I click the button?
Solution
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);
}
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow