jeudi 7 mai 2015

Open Specific Directory Using Storage Access Framework

I'm currently able to obtain a file URI by opening the Lollipop file picker using the code below:

            Intent intent = new Intent();
            intent.setAction(Intent.ACTION_OPEN_DOCUMENT_TREE);
            startActivity(intent);

The file picker opens either at the root of Internal Storage or the last directory that I opened. How can I make the file picker show the contents of a specific directory? For example, I might want the file picker to show the contents of the Download folder after launching like in the picture below.

opened subdirectory

Aucun commentaire:

Enregistrer un commentaire