All Projects → codekidX → Storage Chooser

codekidX / Storage Chooser

Licence: mpl-2.0
Lets user choose files in internal or external storage with just few lines of code.

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Storage Chooser

Materialdatetimepicker
Pick a date or time on Android in style
Stars: ✭ 4,627 (+571.55%)
Mutual labels:  picker
React Native Sectioned Multi Select
a multi (or single) select component with support for sub categories, search, chips.
Stars: ✭ 540 (-21.63%)
Mutual labels:  picker
Linear Time Picker
Gorgeous Android Time and Date picker library inspired by the Timely app
Stars: ✭ 613 (-11.03%)
Mutual labels:  picker
Mkdropdownmenu
🔻 Dropdown Menu for iOS with many customizable parameters to suit any needs
Stars: ✭ 523 (-24.09%)
Mutual labels:  picker
Picker
Picker is a cross-platform UI component for selecting an item from a list of options.
Stars: ✭ 531 (-22.93%)
Mutual labels:  picker
React Native Syan Image Picker
React-Native 多图片选择 支持裁剪 压缩
Stars: ✭ 556 (-19.3%)
Mutual labels:  picker
Rxpaparazzo
RxJava extension for Android to take images using camera and gallery and pick files up
Stars: ✭ 467 (-32.22%)
Mutual labels:  picker
React Datepicker
A simple and reusable datepicker component for React
Stars: ✭ 6,206 (+800.73%)
Mutual labels:  picker
Angular Moment Picker
Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
Stars: ✭ 536 (-22.21%)
Mutual labels:  picker
Agcircularpicker
AGCircularPicker is helpful component for creating a controller aimed to manage any calculated parameter
Stars: ✭ 592 (-14.08%)
Mutual labels:  picker
Lgphotobrowser
照片浏览器,相册选择器,自定义照相机(支持单拍、连拍)
Stars: ✭ 527 (-23.51%)
Mutual labels:  picker
Czpicker
a picker view shown as a popup for iOS in Objective-C
Stars: ✭ 529 (-23.22%)
Mutual labels:  picker
Androidpicker
安卓选择器类库,包括日期及时间选择器(可用于出生日期、营业时间等)、单项选择器(可用于性别、民族、职业、学历、星座等)、二三级联动选择器(可用于车牌号、基金定投日期等)、城市地址选择器(分省级、地市级及区县级)、数字选择器(可用于年龄、身高、体重、温度等)、日历选日期择器(可用于酒店及机票预定日期)、颜色选择器、文件及目录选择器、图片选择器等……WheelPicker/DatePicker/TimePicker/OptionPicker/NumberPicker/LinkagePicker/AddressPicker/CarPlatePicker/CalendarPicker/ColorPicker/FilePicker/ImagePicker etc.
Stars: ✭ 5,320 (+672.13%)
Mutual labels:  picker
Pickerview
One very very user-friendly Picker library(内部提供两种常用类型的Picker:时间选择器(支持聚合)和联动选择器(支持不联动)。支持扩展自定义Picker。支持自定义弹窗。支持作为view的非弹窗场景。)
Stars: ✭ 516 (-25.11%)
Mutual labels:  picker
Louvre
A small customizable library useful to handle an gallery image pick action built-in your app. 🌄🌠
Stars: ✭ 629 (-8.71%)
Mutual labels:  picker
Piximagepicker
Pix is a Whatsapp image picker replica. with this, you can integrate an image picker just like WhatsApp.
Stars: ✭ 488 (-29.17%)
Mutual labels:  picker
React Modern Calendar Datepicker
A modern, beautiful, customizable date picker for React
Stars: ✭ 555 (-19.45%)
Mutual labels:  picker
Wheelpicker
A smooth, highly customizable wheel view and picker view, support 3D effects like iOS. 一个顺滑的、高度自定义的滚轮控件和选择器,支持类似 iOS 的 3D 效果
Stars: ✭ 684 (-0.73%)
Mutual labels:  picker
React Timekeeper
Google Keep app inspired time picker for react 🕓
Stars: ✭ 651 (-5.52%)
Mutual labels:  picker
Alerts And Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...
Stars: ✭ 5,267 (+664.44%)
Mutual labels:  picker

Storage Chooser !News

SC Features

Documentation Version
Documentation

A pretty and simple directory chooser and file picker library for 4.4+ devices. This library was created to be included in OpenGApps App. There are too many storage chooser out there but this one is too materially 😛 . Easy to implement and does not take a lot of your valueable time in setting-up all the other necessary things that every developer seeks, like

  • saving path to sharedPreference
  • event when path is selected and act upon that path
  • and much more.

There are also some really nice features that I thought would come in handy:

  • You show a quick overview of the storages present and their memory available before choosing so that users know which storage to choose.
  • you can choose between sheet and sleek layouts.
  • Inline create folder view (not another dialog to handle)
  • Full localization. I mean literally every strings can be localized to your desired language.
  • Memory thresholding - a restriction or a toast that it shows when user's memory is less than your defined memory of operations.
  • and more will be added soon.

Installation

Add this to your root build.gradle file under repositories:

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

Add this to your app level build.gradle as dependency:

com.github.codekidX:storage-chooser:2.0.4.4

Add this to your gradle.properties file:

android.enableJetifier=true
android.useAndroidX=true

Android 10 News

You can currently use this library on Android 10 devices by adding android:requestLegacyExternalStorage="true" to your AndroidManifest.xml. The release of 3.0 was to happen by December 2019 but was put to hold in light of new situations and re-evaluation of what is more important to this library, features? stability? future-ready?.

There is an implementation of SAF going on in inline-3.0 branch and would surface in this release as a breaking change.

Notes

In order to save state between orientation, storage-chooser requires you to add this to AndroidManifest.xml activity tag

Before you implement this library here are some notes that you can follow to avoid errors.

android:configChanges="orientation|screenSize"

Confirm:

  • You have asked for Runtime Permission from the user in the past to avoid read errors.
  • Permissions with "READ_EXTERNAL_STORAGE" and "WRITE_EXTERNAL_STORAGE" is enough for this library to work.
  • This library follows same color scheme as that of the parent app to maintain the aesthetic of the parent app. See the color scheme section below

Implementation

Simple Type

  • Let's you toggle between inernal/external root directory.
// Initialize Builder
StorageChooser chooser = new StorageChooser.Builder()
.withActivity(MainActivity.this)
.withFragmentManager(getFragmentManager())
.withMemoryBar(true)
.build();

// Show dialog whenever you want by
chooser.show();

// get path that the user has chosen
chooser.setOnSelectListener(new StorageChooser.OnSelectListener() {
    @Override
    public void onSelect(String path) {
        Log.e("SELECTED_PATH", path);
    }
});

OUTPUT: /storage/emulated/0

Pre-defined Type

  • Let's you append a specific path to the root of internal or external directory.
// --- ADD --
.withPredefinedPath(STATIC_PATH)

OUTPUT: /storage/emulated/0/Downloads/CodekidLabs

Custom Type

  • Let's your user choose custom directory/file.

Directory Chooser

// --- ADD ---
.allowCustomPath(true)
.setType(StorageChooser.DIRECTORY_CHOOSER)

File Picker

// --- ADD ---
.allowCustomPath(true)
.setType(StorageChooser.FILE_PICKER)

Save directly to preference

// --- ADD ---
.actionSave(true)
.withPreference(sharedPreferences)

Get path from preference

String path = sharedPreferences.getString(DiskUtil.SC_PREFERENCE_KEY,"");

(2.0+) Multiselect

It's already in there you don't need to write any special code for it. Just make sure your type of chooser is of type FILE_PICKER. builder.setType(StorageChooser.FILE_PICKER);

More information

License

This project is licensed with the Mozilla Public License v2.

In practice, you can use this library as-is, with a notification of it being used. If you make any changes, you are required to publish your changes under a compatible license.

Contributing

Branch status:

Production Development
master inline-3.0

You can contribute to this library by creating a pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].