Coder Social home page Coder Social logo

abreuy / noobfilechooser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abhi347/noobfilechooser

0.0 0.0 0.0 179 KB

A complete File manager for Android with complete support of Storage Access Framework.

License: GNU Lesser General Public License v3.0

Java 100.00%

noobfilechooser's Introduction

AUR Build Status Codacy Badge Issue Count

NoobFileChooser - SAF ready file chooser for Android

A complete File manager for Android with complete support of Storage Access Framework. Now you won't need to rely on Android's stock system UI to deliver files from the External SD Card.

Features

  • No need to code for extra permissions
  • Simplest possible code to fetch files
  • Custom User Interface

Planned feature

  • More Customization support
  • Support for devices lower than Android 5.0

Setup

NoobFileChooser is hosted at jitpack.io. The instructions are as follows -
Step 1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:

allprojects {
	    repositories {
			...
	    	maven { url "https://jitpack.io" }
		}
}

Step 2. Add the dependency

dependencies {
        compile 'com.github.Abhi347:NoobFileChooser:0.3.0'
  }

Usage

You just need to set a listener for selecting single and or multiple files (We need to work on this part a bit) and then call the NoobFileActivity using an intent like any other activity in your app.

NoobManager.getInstance().setNoobFileSelectedListener(new OnNoobFileSelected() {
    @Override
        public void onSingleFileSelection(NoobFile file) {
            //Use the file Object
        }

        @Override
        public void onMultipleFilesSelection(List<NoobFile> files) {
            //Use the files Object
        }
});
Intent _intent = new Intent(this, NoobFileActivity.class);
startActivity(_intent);

The result is provided in the form of NoobFile or a List of NoobFile objects.

Advanced Usage

If you want to customize the User Interface, you can use NoobConfig class. Just put the following lines before setting the OnNoobFileSelected Listener.

NoobConfig noobConfig = new NoobConfig();
noobConfig.setFolderDrawableResource(R.drawable.ic_folder) //Use your own Folder Drawable
          .setFileDrawableResource(R.drawable.ic_file) //Use your own Vanilla File Drawable
          .setImageFileDrawableResource(R.drawable.ic_image_file) //Use your own Image File Drawable
          .setAudioFileDrawableResource(R.drawable.ic_audio_file) //Use your own Audio File Drawable
          .setVideoFileDrawableResource(R.drawable.ic_video_file) //Use your own Video File Drawable
          .setFileGridLayoutItemResource(R.layout.item_noob_file_item) //Use your own Layout Resource for each File Item. Please check item_noob_file_item.xml for ids
          .setFileGridLayoutResource(R.layout.fragment_noob_file) //Use your own Layout Resource for the complete file fragment. Please check fragment_noob_file.xml for ids.
NoobManager.getInstance().setConfig(noobConfig);

Changelog (0.3.0)

  • Added Support for Internal Storage
  • Added Support for using File class in NoobFile Wrapper
  • Revamped UI (Still need few tweaks)
  • Auto Display content of SD Card, if permission is already granted
  • Auto Load of Internal Storage if SD Card is not found or permission is not given to SD Card
  • Added ButterKnife for Binding Views
  • Bug fixes

Contributions

Feel free to report bugs, feedback or even suggest new features. I'd love to make it a great library.

Credits

Icons are provided by Icons8. Check with them for license, you want to use the icons in your project too.

Donate

Paypal

Warning

NoobFileChooser is not a production ready library (We haven't reached 1.0.0 yet) and thus you should not use it in a production ready code. Please read the license term carefully before including it in your projects.

noobfilechooser's People

Contributors

abhi347 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.