{"id":24216709,"url":"https://github.com/codekidx/storage-chooser","last_synced_at":"2025-04-04T07:04:56.878Z","repository":{"id":44778236,"uuid":"75954003","full_name":"codekidX/storage-chooser","owner":"codekidX","description":"Lets user choose files in internal or external storage with just few lines of code.","archived":false,"fork":false,"pushed_at":"2022-03-21T09:55:05.000Z","size":695,"stargazers_count":717,"open_issues_count":47,"forks_count":152,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-28T06:03:42.203Z","etag":null,"topics":["android-filepicker","file-picker","picker","storage-chooser"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codekidX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-08T16:12:39.000Z","updated_at":"2025-03-19T05:29:53.000Z","dependencies_parsed_at":"2022-08-12T11:21:50.938Z","dependency_job_id":null,"html_url":"https://github.com/codekidX/storage-chooser","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekidX%2Fstorage-chooser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekidX%2Fstorage-chooser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekidX%2Fstorage-chooser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekidX%2Fstorage-chooser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codekidX","download_url":"https://codeload.github.com/codekidX/storage-chooser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135141,"owners_count":20889420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-filepicker","file-picker","picker","storage-chooser"],"created_at":"2025-01-14T04:46:18.998Z","updated_at":"2025-04-04T07:04:56.855Z","avatar_url":"https://github.com/codekidX.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Storage Chooser [!News](https://github.com/codekidX/storage-chooser/tree/inline-3.0#android-10-news)\n\n![SC Features](http://i.imgur.com/nmqPJok.gif)\n\n| **`Documentation`** | **`Version`** |\n|-----------------| --------------|\n| [![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://ashishshekar.com/projects/sc/) | [![](https://jitpack.io/v/codekidX/storage-chooser.svg)](https://jitpack.io/#codekidX/storage-chooser) |\n\nA pretty and simple directory chooser and file picker library for 4.4+ devices. This library was created to be included in [OpenGApps App](https://play.google.com/store/apps/details?id=org.opengapps.app). There are too many storage chooser out there but this one is too materially :stuck_out_tongue: . 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\n\n- saving path to sharedPreference\n- event when path is selected and act upon that path\n- and much more.\n\nThere are also some really nice features that I thought would come in handy:\n\n- You show a quick overview of the storages present and their memory available before choosing so that users know which storage to choose.\n- you can choose between _sheet and sleek_ layouts.\n- Inline create folder view _(not another dialog to handle)_\n- Full localization. I mean literally every strings can be localized to your desired language.\n- Memory thresholding - a restriction or a toast that it shows when user's memory is less than your defined memory of operations.\n- and more will be added soon.\n\n## Installation\n\nAdd this to your root build.gradle file under repositories:\n\n    allprojects {\n    \trepositories {\n    \t\tmaven { url \"https://jitpack.io\" }\n    \t}\n    }\n\nAdd this to your app level build.gradle as dependency:\n\n    com.github.codekidX:storage-chooser:2.0.4.4\n\nAdd this to your gradle.properties file:\n\n```gradle\nandroid.enableJetifier=true\nandroid.useAndroidX=true\n```\n\n## Android 10 News\n\nYou can currently use this library on Android 10 devices by adding `android:requestLegacyExternalStorage=\"true\"` to your AndroidManifest.xml.\nThe 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?.\n\nThere is an implementation of [SAF](https://developer.android.com/guide/topics/providers/document-provider) going on in [inline-3.0](https://github.com/codekidX/storage-chooser/tree/inline-3.0)\nbranch and would surface in this release as a **breaking change**.\n\n\n## Notes\n\nIn order to save state between orientation, storage-chooser requires you to add this to AndroidManifest.xml `activity` tag\n\nBefore you implement this library here are some notes that you can follow to avoid errors.\n\n```xml\nandroid:configChanges=\"orientation|screenSize\"\n```\n\n**Confirm:**\n\n\u003e - You have asked for **Runtime Permission** from the user in the past to avoid read errors.\n\u003e - Permissions with \"READ_EXTERNAL_STORAGE\" and \"WRITE_EXTERNAL_STORAGE\" is enough for this library to work.\n\u003e - 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_\n\n## Implementation\n\n### Simple Type\n\n- Let's you toggle between internal/external root directory.\n\n```java\n// Initialize Builder\nStorageChooser chooser = new StorageChooser.Builder()\n.withActivity(MainActivity.this)\n.withFragmentManager(getFragmentManager())\n.withMemoryBar(true)\n.build();\n\n// Show dialog whenever you want by\nchooser.show();\n\n// get path that the user has chosen\nchooser.setOnSelectListener(new StorageChooser.OnSelectListener() {\n    @Override\n    public void onSelect(String path) {\n        Log.e(\"SELECTED_PATH\", path);\n    }\n});\n```\n\n\u003e OUTPUT: **/storage/emulated/0**\n\n### Pre-defined Type\n\n- Let's you append a specific path to the root of internal or external directory.\n\n```java\n// --- ADD --\n.withPredefinedPath(STATIC_PATH)\n```\n\n\u003e OUTPUT: **/storage/emulated/0/Downloads/CodekidLabs**\n\n### Custom Type\n\n- Let's your user choose custom directory/file.\n\n#### Directory Chooser\n\n```java\n// --- ADD ---\n.allowCustomPath(true)\n.setType(StorageChooser.DIRECTORY_CHOOSER)\n```\n\n#### File Picker\n\n```java\n// --- ADD ---\n.allowCustomPath(true)\n.setType(StorageChooser.FILE_PICKER)\n```\n\n### Save directly to preference\n\n```java\n// --- ADD ---\n.actionSave(true)\n.withPreference(sharedPreferences)\n```\n\n### Get path from preference\n\n```java\nString path = sharedPreferences.getString(DiskUtil.SC_PREFERENCE_KEY,\"\");\n```\n\n### (2.0+) Multiselect\n\nIt'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.\n`builder.setType(StorageChooser.FILE_PICKER);`\n\n![](https://media.giphy.com/media/7AWKkgm9Nozw4/giphy.gif)\n\n\n### More information\n\n- [A Look at StorageChooser.Theme](https://github.com/codekidX/storage-chooser/wiki/A-Look-at-Storage-Chooser.Theme).\n- [Localizing your chooser with Content](https://github.com/codekidX/storage-chooser/wiki/Localizing-your-chooser-using-Content)\n\n\n## License\n\nThis project is licensed with the Mozilla Public License v2.\n\nIn 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.\n\n\n### Contributing\n\nBranch status:\n\n| **`Production`** | **`Development`** |\n|------------------|-------------------|\n| master | inline-3.0 |\n\n\nYou can contribute to this library by [creating a pull request](https://github.com/codekidX/storage-chooser/pull/new/master).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodekidx%2Fstorage-chooser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodekidx%2Fstorage-chooser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodekidx%2Fstorage-chooser/lists"}