{"id":18842854,"url":"https://github.com/chililabs/chiliphotopicker","last_synced_at":"2025-04-06T19:13:41.711Z","repository":{"id":43174478,"uuid":"215256590","full_name":"ChiliLabs/ChiliPhotoPicker","owner":"ChiliLabs","description":"Photo picker library for android. Let's you pick photos directly from files, or navigate to camera or gallery.","archived":false,"fork":false,"pushed_at":"2021-01-14T12:50:19.000Z","size":4650,"stargazers_count":407,"open_issues_count":17,"forks_count":46,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-30T18:08:45.480Z","etag":null,"topics":["android","image-picker","library"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/ChiliLabs.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":"2019-10-15T09:15:26.000Z","updated_at":"2024-12-12T02:51:09.000Z","dependencies_parsed_at":"2022-09-13T21:41:09.423Z","dependency_job_id":null,"html_url":"https://github.com/ChiliLabs/ChiliPhotoPicker","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChiliLabs%2FChiliPhotoPicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChiliLabs%2FChiliPhotoPicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChiliLabs%2FChiliPhotoPicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChiliLabs%2FChiliPhotoPicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChiliLabs","download_url":"https://codeload.github.com/ChiliLabs/ChiliPhotoPicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535520,"owners_count":20954576,"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","image-picker","library"],"created_at":"2024-11-08T02:55:52.261Z","updated_at":"2025-04-06T19:13:41.693Z","avatar_url":"https://github.com/ChiliLabs.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChiliPhotoPicker\n\nMade with ❤️ by [Chili Labs](https://chililabs.io).\n\nLibrary made without DataBinding, RxJava and image loading libraries, to give you opportunity to use it without additional dependencies.\n\n![](images/example.gif)\n\n- Picker styled as bottom sheet dialog\n- Could be used for single or multiple photos pick\n- Allows to choose how images are loaded into ImageView\n- Takes responsibility for all needed permissions\n- Takes responsibility for fetching gallery/camera result\n- Have two built-in themes - Light and Dark\n- Easy custamizable\n\n\n| No permission                   | Single choice                      | Multiple choice                   |\n|:-------------------------------:|:----------------------------------:|:---------------------------------:|\n|![](images/screen_permission.png)| ![](images/screen_single.png)      | ![](images/screen_multiple.png)   |\n\n## Setup\n\nGradle:\n\nAdd Jitpack to your root `build.gradle` file:\n\n```\nallprojects {\n    repositories {\n        google()\n        jcenter()\n        maven { url \"https://jitpack.io\" }\n    }\n}\n```\n\nAdd dependency to application `build.gradle` file, where `x.y.z` is the latest [release version](https://github.com/ChiliLabs/ChiliPhotoPicker/releases):\n\n[![](https://jitpack.io/v/ChiliLabs/ChiliPhotoPicker.svg)](https://jitpack.io/#ChiliLabs/ChiliPhotoPicker)\n\n```\nimplementation \"com.github.ChiliLabs:ChiliPhotoPicker:x.y.z\"\n```\n\n## Usage\n\nInitialize `ChiliPhotoPicker` in your `Application`'s class `onCreate`\n- `loader` - your preferred `ImageLoader` implementation (ready examples for Glide and Picasso are [here](https://github.com/ChiliLabs/ChiliPhotoPicker/tree/master/sample/src/main/java/lv/chi/chiliphotopicker/loaders))\n- `authority` - your file provider authority. Is needed if you set `allowCamera` to `true`, so picker could store temporary photo from camera\n\n``` kotlin\nChiliPhotoPicker.init(\n        loader = GlideImageLoader(),\n        authority = \"lv.chi.sample.fileprovider\"\n    )\n```\n\nCreate new instance of `PhotoPickerFragment`\n- `multiple` - true for multiple image pick, false for single\n- `allowCamera` - true to show Camera button, false to hide\n- `maxSelection` - limit images count to pick\n- `theme` - built-in or custom theme (by default `ChiliPhotoPicker.Light` is used)\n- Show as dialog\n\n``` kotlin\nPhotoPickerFragment.newInstance(\n        multiple = true, \n        allowCamera = true,\n        maxSelection = 5,\n        theme = R.style.ChiliPhotoPicker_Dark\n).show(supportFragmentManager, YOUR_TAG)\n```\nNotes:\nPicker will throw exception if:\n- `loader` was not initialized\n- `authority` was null while accessing camera\n\n### ImageLoader\n\nWe don't want to depend on many image loading libraries, so we have simple `ImageLoader` interface, which you can implement using your preferred library (Glide, Picasso, Coil, etc.)\nWe have two working examples of `ImageLoader` implementations - using [Glide](https://github.com/ChiliLabs/ChiliPhotoPicker/blob/master/sample/src/main/java/lv/chi/chiliphotopicker/loaders/GlideImageLoader.kt) and [Picasso](https://github.com/ChiliLabs/ChiliPhotoPicker/blob/master/sample/src/main/java/lv/chi/chiliphotopicker/loaders/PicassoImageLoader.kt). You can just copy one of them or write your own implementation\n\n### Callback\n\nPicked photos URIs are returned via callbacks `onImagesPicked` function, so you just need to implement `PhotoPickerFragment.Callback` interface in your activity or fragment\n\n### Themes\n\nTo customize picker you can use one of [built-in themes](https://github.com/ChiliLabs/ChiliPhotoPicker/blob/master/photopicker/src/main/res/values/themes.xml) or inherit it rewriting [attributes](https://github.com/ChiliLabs/ChiliPhotoPicker/blob/master/photopicker/src/main/res/values/attrs.xml) you want (see [example](https://github.com/ChiliLabs/ChiliPhotoPicker/blob/master/sample/src/main/res/values/styles.xml))\n\nAttributes:\n- `pickerBackgroundColor` - background color\n- `pickerPrimaryColor` - primary picker color (no permission/empty texts, cancel icon)\n- `pickerSecondaryColor` - secondary picker color (snackbar)\n- `pickerControlColor` - color of buttons, icons, checkboxes, ripple\n- `pickerGalleryIcon` - drawable for Gallery icon (to remove it use `@null` as attribute value)\n- `pickerCameraIcon` - drawable for Camera icon (to remove it use `@null` as attribute value)\n- `pickerCornerRadius` - background's corners radius\n- `pickerDividerColor` - color of line below Gallery/Camera buttons\n\n### Localization\n\nIt's difficult to translate library to each language, so default strings are on English, but you can easily override them. Example for common strings and plurals are [here](https://github.com/ChiliLabs/ChiliPhotoPicker/blob/master/sample/src/main/res/values/strings.xml). All strings used in library can be found [here](https://github.com/ChiliLabs/ChiliPhotoPicker/blob/master/photopicker/src/main/res/values/strings.xml)\n\n## License\n\n```\nCopyright 2019 Chili Labs\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchililabs%2Fchiliphotopicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchililabs%2Fchiliphotopicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchililabs%2Fchiliphotopicker/lists"}