Open Default File Manager in android?
-
23-06-2021 - |
Pregunta
My Android Device contains Default File Manager and a Button (Open). How to open the file manager when I click the button?
Solución
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);
}
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow