Skip to content

A light-weight android library that can be quickly integrated into any app to let users choose folder, also files (but esp built for folders).

License

Notifications You must be signed in to change notification settings

naseemakhtar994/android-folder-picker-library

 
 

Repository files navigation

android-folder-picker-library

Demo Bintray License

A light-weight android library that can be quickly integrated into any app to let users choose folder, also files (but esp built for folders).

Example Uses

  • To let users choose folder for saving files
  • To let users choose backup folder
  • To let users pick files to upload etc...

Screenshots

Preview Preview Preview
Can pick folders Can create folder Can also pick file

Installation

For your convenience, it is available on jCenter, So just add this in your app dependencies:

    compile 'lib.kashif:folderpicker:2.2'

Usage

To pick folder

        Intent intent = new Intent(this, FolderPicker.class);
        startActivityForResult(intent, FILEPICKER_CODE);        
        
        protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
          if (requestCode == FILEPICKER_CODE && resultCode == Activity.RESULT_OK) {

              String folderLocation = intent.getExtras().getString("data");
              Log.i( "folderLocation", folderLocation );
            
          }
        }
        

Options

       //To show a custom title
       intent.putExtra("title", "Select file to upload");
       
       //To begin from a selected folder instead of sd card's root folder. Example : Pictures directory
       intent.putExtra("location", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath());
       
       //To pick files
       intent.putExtra("pickFiles", true);
       

Click to see an example working code

About

A light-weight android library that can be quickly integrated into any app to let users choose folder, also files (but esp built for folders).

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Java 100.0%