{"id":18894538,"url":"https://github.com/developerpaul123/filepickerlibrary","last_synced_at":"2025-04-15T00:32:10.613Z","repository":{"id":57719709,"uuid":"22743378","full_name":"DeveloperPaul123/FilePickerLibrary","owner":"DeveloperPaul123","description":"Simple library that allows for the picking of files and/or directories.","archived":false,"fork":false,"pushed_at":"2018-03-18T01:52:58.000Z","size":13816,"stargazers_count":79,"open_issues_count":4,"forks_count":25,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-28T13:05:26.807Z","etag":null,"topics":["android","android-arsenal","android-lib","android-libraries","android-library","android-libs","file","filechooser","filepicker","files","java","material","material-design","material-ui"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeveloperPaul123.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":"2014-08-08T02:29:48.000Z","updated_at":"2024-06-25T01:21:01.000Z","dependencies_parsed_at":"2022-09-26T21:40:55.139Z","dependency_job_id":null,"html_url":"https://github.com/DeveloperPaul123/FilePickerLibrary","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperPaul123%2FFilePickerLibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperPaul123%2FFilePickerLibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperPaul123%2FFilePickerLibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperPaul123%2FFilePickerLibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeveloperPaul123","download_url":"https://codeload.github.com/DeveloperPaul123/FilePickerLibrary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248984443,"owners_count":21193753,"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","android-arsenal","android-lib","android-libraries","android-library","android-libs","file","filechooser","filepicker","files","java","material","material-design","material-ui"],"created_at":"2024-11-08T08:22:56.811Z","updated_at":"2025-04-15T00:32:05.603Z","avatar_url":"https://github.com/DeveloperPaul123.png","language":"Java","readme":"# FilePickerLibrary\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-FilePickerLibrary-blue.svg?style=flat-square)](http://android-arsenal.com/details/1/785)\n\n[![Release](https://jitpack.io/v/DeveloperPaul123/FilePickerLibrary.svg)](https://jitpack.io/#DeveloperPaul123/FilePickerLibrary)\n\nSimple library that allows for picking of files and directories. This is a clean and simple way to allow your user to easily select a file. This library is inspired by Android L and the new Material Design guidelines adding to its sleekness and beauty.\n\n![image](images/main_framed.png)\n\n## A Quick Overview What's In\n* Compatible down to API Level 16\n\n## Include to Project\n### Provide the Gradle Dependency\n#### Step 1\nAdd the JitPack in your root `build.gradle` at the end of repositories:\n```gradle\nallprojects {\n    repositories {\n        ...\n        maven { url \"https://jitpack.io\" }\n    }\n}\n```\n#### Step 2\nAdd the dependency\n```gradle\ndependencies {\n    compile 'com.github.DeveloperPaul123:FilePickerLibrary:3.5.1'\n}\n```\n### Clone or Download `.zip` file\nClone this repository or download the compressed file, then extract to your computer. Simply import the `library` module to your project.\n\n## Usages\nUse one of the following samples or simply compile and test the sample `app` provided:\n### Material Theme Used (with Modern Builder)\n```java\nnew FilePickerBuilder(this)\n    .withColor(android.R.color.holo_blue_bright)\n    .withRequest(Request.FILE)\n    .withScope(Scope.ALL)\n    .withMimeType(MimeType.JPEG)\n    .useMaterialActivity(true)\n    .launch(REQUEST_FILE);\n```\n### `image/png` Mime Type\n```java\nIntent filePicker = new Intent(this, FilePickerActivity.class);\nfilePicker.putExtra(FilePickerActivity.SCOPE, Scope.ALL);\nfilePicker.putExtra(FilePickerActivity.REQUEST, Request.FILE);\nfilePicker.putExtra(FilePickerActivity.INTENT_EXTRA_COLOR_ID, android.R.color.holo_green_dark);\nfilePicker.putExtra(FilePickerActivity.MIME_TYPE, MimeType.PNG);\nstartActivityForResult(filePicker, REQUEST_FILE);\n```\n### Show as a Dialog\n```java\nIntent filePickerDialogIntent = new Intent(this, FilePickerActivity.class);\nfilePickerDialogIntent.putExtra(FilePickerActivity.THEME_TYPE, ThemeType.DIALOG);\nfilePickerDialogIntent.putExtra(FilePickerActivity.REQUEST, Request.FILE);\nstartActivityForResult(filePickerDialogIntent, REQUEST_FILE);\n```\n### Select a Directory\n```java\nIntent filePickerActivity = new Intent(this, FilePickerActivity.class);\nfilePickerActivity.putExtra(FilePickerActivity.SCOPE, Scope.ALL);\nfilePickerActivity.putExtra(FilePickerActivity.REQUEST, Request.DIRECTORY);\nfilePickerActivity.putExtra(FilePickerActivity.INTENT_EXTRA_FAB_COLOR_ID, android.R.color.holo_green_dark);\nstartActivityForResult(filePickerActivity, REQUEST_DIRECTORY);\n```\nTo have the result, you must override `onActivityResult(int, int, Intent)` method as I did below:\n\n```java\n@Override\npublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n    super.onActivityResult(requestCode, resultCode, data);\n\n    if ((requestCode == REQUEST_DIRECTORY) \u0026\u0026 (resultCode == RESULT_OK)) {\n        Toast.makeText(this, \"Directory Selected: \" + data.getStringExtra(FilePickerActivity.FILE_EXTRA_DATA_PATH), Toast.LENGTH_LONG).show();\n    } else if ((requestCode == REQUEST_FILE) \u0026\u0026 (resultCode == RESULT_OK)) {\n        Toast.makeText(this, \"File Selected: \" + data.getStringExtra(FilePickerActivity.FILE_EXTRA_DATA_PATH), Toast.LENGTH_LONG).show();\n    }\n}\n```\n## Contributors\n- [Paul T](mailto:developer.paul.123@gmail.com) (developer)\n- [Alireza Eskandarpour Shoferi](https://twitter.com/enormoustheory) (contributor)\n\n## License\n    Copyright 2016 Paul T\n    \n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n    \n    http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloperpaul123%2Ffilepickerlibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloperpaul123%2Ffilepickerlibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloperpaul123%2Ffilepickerlibrary/lists"}