A FilePicker library for Android for selecting multiple types of files and also to capture Images and Videos.
This wrapper of : https://github.com/jaiselrahman/FilePicker
Configuration:
How to use:
- Download all AAR and JAR from here https://www.dropbox.com/s/vg3k1zpnd89v8gw/LibAAR.zip?dl=1
(Too BIG for upload attachment)
- Use Appcompat library 4.0
- Add to Manifest :
- Config FilePickerConfigurations
- StartActivityForResult and wait for IOnActivityResult
- Please use example zip to start it!
This wrapper of : https://github.com/jaiselrahman/FilePicker
Configuration:
Methods | Default value | Uses |
---|---|---|
setShowImages(boolean) | true | Whether to load Images files |
setShowVideos(boolean) | true | Whether to load Videos files |
setShowAudios(boolean) | false | Whether to load Audio files |
setShowFiles(boolean) | false | Whether to load Files for given suffixes |
enableImageCapture(boolean) | false | Enables camera for capturing of images |
enableVideoCapture(boolean) | false | Enables camera for capturing of videos |
setCheckPermission(boolean) | false | Whether to request permissions on runtime for API >= 23 if not granted |
setSuffixes(String...) | "txt", "pdf", "html", "rtf", "csv", "xml", "zip", "tar", "gz", "rar", "7z","torrent", "doc", "docx", "odt", "ott", "ppt", "pptx", "pps", "xls", "xlsx", "ods", "ots" | Suffixes for file to be loaded, overrides default value |
setMaxSelection(int) | -1 | Maximum no of items to be selected, -1 for no limits |
setSingleChoiceMode(boolean) | false | Can select only one file, overrides setMaxSelection(int) use setSelectedMediaFile(MediaFile) to set default selection |
setSelectedMediaFile(MediaFile) | null | Default file selection in singleChoiceMode |
setSelectedMediaFiles(ArrayList<MediaFile>) | null | Default files to be marked as selected |
setSingleClickSelection(boolean) | true | Start selection mode on single click else on long click |
setSkipZeroSizeFiles(boolean) | true | Whether to load zero byte sized files |
setLandscapeSpanCount(int) | 5 | Grid items in landscape mode |
setPortraitSpanCount(int) | 3 | Grid items in portrait mode |
setImageSize(int) | Screen width/portraitSpanCount | Size of height, width of image to be loaded in Px |
setRootPath(String) | External storage | Set custom directory path to load files from |
setIgnorePaths(String... ignorePaths) | null | Regex patterns of paths to ignore |
setIgnoreNoMedia(boolean) | true | Whether to ignore .nomedia file |
setIgnoreHiddenFile(boolean) | true | Whether to ignore hidden file |
How to use:
- Download all AAR and JAR from here https://www.dropbox.com/s/vg3k1zpnd89v8gw/LibAAR.zip?dl=1
(Too BIG for upload attachment)
- Use Appcompat library 4.0
- Add to Manifest :
B4X:
AddApplicationText(<activity
android:name="com.jaiselrahman.filepicker.activity.FilePickerActivity" >
</activity>
<activity
android:name="com.jaiselrahman.filepicker.activity.DirSelectActivity" >
</activity>
)
- StartActivityForResult and wait for IOnActivityResult
- Please use example zip to start it!