Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hi-manshu/Pluck
Pluck, a library that helps you to pick image via Gallery/Camera built using Compose
https://github.com/hi-manshu/Pluck
android android-lib android-library android-libs compose image-picker image-picker-android image-picker-library jetpack-compose kotlin kotlin-android kotlin-library sdk sdk-android
Last synced: 3 months ago
JSON representation
Pluck, a library that helps you to pick image via Gallery/Camera built using Compose
- Host: GitHub
- URL: https://github.com/hi-manshu/Pluck
- Owner: hi-manshu
- License: apache-2.0
- Created: 2022-01-30T15:10:57.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-26T02:44:58.000Z (4 months ago)
- Last Synced: 2024-07-26T03:57:06.530Z (4 months ago)
- Topics: android, android-lib, android-library, android-libs, compose, image-picker, image-picker-android, image-picker-library, jetpack-compose, kotlin, kotlin-android, kotlin-library, sdk, sdk-android
- Language: Kotlin
- Homepage: https://www.himanshoe.com
- Size: 6.05 MB
- Stars: 362
- Watchers: 4
- Forks: 23
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- mobile-awesome - Pluck - Pluck, a library that helps you to pick image via Gallery/Camera built using Compose. (Multiplatform / Multiplatform libraries)
README
### Pluck - The image-picker library for Compose
![Pluck](art/pluck.jpg)
This is an image-picker for your jetpack compose project. You can select from Gallery/Camera. This uses Material you and will be getting support for it in future as well.
_Made with ❤️ for Android Developers by Himanshu_
[![Maven Central](https://img.shields.io/maven-central/v/com.himanshoe/pluck)](https://search.maven.org/artifact/com.himanshoe/pluck)
[![Github Followers](https://img.shields.io/github/followers/hi-manshu?label=Follow&style=social)](https://github.com/hi-manshu)
[![Twitter Follow](https://img.shields.io/twitter/follow/hi_man_shoe?label=Follow&style=social)](https://twitter.com/hi_man_shoe)## Implementation
#### Step: 01
Add the specific permission in `AndroidManifest.xml` file
```xml
```
#### Step: 02
In `build.gradle` of app module, include the following dependency
```gradle
dependencies {
implementation("com.himanshoe:pluck:1.0.0-RC2")
}
```## Usage
#### 01
Now, to start using Pluck, use the composable `Pluck` like,
```kotlin
Pluck(onPhotoSelected = {
// List of PluckImage when selecting from Gallery/Camera. When checking with Camera
// It returns only one item in list
})
```#### 02
Now, if you want `Pluck` to handle the Permission for you as well. Use it like,
```kotlin
Permission(
permissions = listOf(
Manifest.permission.CAMERA,
Manifest.permission.READ_EXTERNAL_STORAGE
),
goToAppSettings = {
// Go to App Settings
}
) {
Pluck(onPhotoSelected = {
// List of PluckImage when selecting from Gallery/Camera. When checking with Camera
// It returns only one item in list
})
}
```#### 03
If you want to configure do you want to select single image or multiple image from gallery you need
to edit the `PluckConfiguration` like,```kotlin
Pluck(
pluckConfiguration = PluckConfiguration(multipleImagesAllowed = true),
onPhotoSelected = { }
)
```### Drop a ⭐ to keep me motivated to keep working on Open-Source. Updates coming Soon!