Zubair
Zubair

Reputation: 314

Marking folders and getting their Path

I want to give user an interface so that he can mark folders and at the back-end I will get their path. But I don't have any idea how to do this. Currenty I am starting an intent to choose image from gallery then save its path. Here is my code.

Intent intent = new Intent();
    intent.setType("image/*");
    intent.setAction(Intent.ACTION_GET_CONTENT);
    startActivityForResult(Intent.createChooser(intent, "Select an Image"),1);

But I want instead of image chooser it should display all the folders and user sould mark those, any ideas?

Upvotes: 1

Views: 209

Answers (1)

Moin Ahmed
Moin Ahmed

Reputation: 2898

Check the below links for the file/folder picker Api.

Simply just use this API and in onActivityResult, you will get the selected folder/file path.

If you want to implement custom picker then have a look at this tutorial, this will give you some hint about start.

Upvotes: 1

Related Questions