Select folder dialog on android?
Asked Answered
C

2

14

Is there some 'select folder dialog' on android SDK ? I google it and i did not find anything.

I mean that i looking for dialog that will popup and give me the option to select a path of folder ( like select file dialog ... but the return argument will be full path of a folder )

Its hard to believe that on this marvelous sdk there is no way to select full folder path.

Any help please ..

thanks.

Corder answered 21/5, 2017 at 8:14 Comment(3)
but can u explain more about your requirement buddy, Unable to understand?Catholic
add more explain embeddedCorder
https://mcmap.net/q/626549/-trying-open-a-specific-folder-in-android-using-intent-duplicateCatholic
C
12
public void performFileSearch() {
   Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
   startActivityForResult(intent, READ_REQUEST_CODE);
}

Or If you using samsung phone, You can call Intent.

//Samsung Device
    Intent intent = new Intent("com.sec.android.app.myfiles.PICK_DATA");
    intent.putExtra("CONTENT_TYPE", "*/*");
    intent.addCategory(Intent.CATEGORY_DEFAULT);

providers/document-provider

This link will be help for you

Cupola answered 21/5, 2017 at 8:38 Comment(2)
As OP is asking to select a folder you should have told about ACTION_OPEN_DOCUMENT_TREE instead ;-). Yours is for selecting a file.Pico
You made a big mesh out of it now.Pico
A
2

you can use this library to do the same: https://github.com/passy/Android-DirectoryChooser

Ansilme answered 21/5, 2017 at 8:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.