{"id":18456388,"url":"https://github.com/nicosnicolaou16/imagepickerandroid","last_synced_at":"2026-06-27T21:00:55.828Z","repository":{"id":167660899,"uuid":"637211714","full_name":"NicosNicolaou16/ImagePickerAndroid","owner":"NicosNicolaou16","description":"🏞 Image and Video Picker library for Android that supports Base64 for images and is compatible with both Layouts and Jetpack Compose.","archived":false,"fork":false,"pushed_at":"2026-06-27T16:56:20.000Z","size":24283,"stargazers_count":54,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-27T17:06:55.764Z","etag":null,"topics":["android","android-library","androiddev","base64","base64-image","compose","converter-image-to-base64","development","image-picker-android","image-video-picker-android","jetpack-compose","kotlin","layout","layout-android","multiple-images-picker","picker","picker-library","resize-images","video-picker-android","view"],"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/NicosNicolaou16.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-06T21:12:49.000Z","updated_at":"2026-04-28T18:03:11.000Z","dependencies_parsed_at":"2023-12-01T20:28:51.719Z","dependency_job_id":"c4c79ba4-1d68-4cc1-b5f3-4e4afdb5a222","html_url":"https://github.com/NicosNicolaou16/ImagePickerAndroid","commit_stats":null,"previous_names":["nicosnicolaou16/imagepickerandroid"],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/NicosNicolaou16/ImagePickerAndroid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicosNicolaou16%2FImagePickerAndroid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicosNicolaou16%2FImagePickerAndroid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicosNicolaou16%2FImagePickerAndroid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicosNicolaou16%2FImagePickerAndroid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicosNicolaou16","download_url":"https://codeload.github.com/NicosNicolaou16/ImagePickerAndroid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicosNicolaou16%2FImagePickerAndroid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34867616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-library","androiddev","base64","base64-image","compose","converter-image-to-base64","development","image-picker-android","image-video-picker-android","jetpack-compose","kotlin","layout","layout-android","multiple-images-picker","picker","picker-library","resize-images","video-picker-android","view"],"created_at":"2024-11-06T08:11:22.487Z","updated_at":"2026-06-27T21:00:55.803Z","avatar_url":"https://github.com/NicosNicolaou16.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Picker Android\n\n[![](https://jitpack.io/v/NicosNicolaou16/ImagePickerAndroid.svg)](https://jitpack.io/#NicosNicolaou16/ImagePickerAndroid)\n\n[![Linktree](https://img.shields.io/badge/linktree-1de9b6?style=for-the-badge\u0026logo=linktree\u0026logoColor=white)](https://linktr.ee/nicos_nicolaou)\n[![Static Badge](https://img.shields.io/badge/Site-blue?style=for-the-badge\u0026label=Web)](https://nicosnicolaou16.github.io/)\n[![X](https://img.shields.io/badge/X-%23000000.svg?style=for-the-badge\u0026logo=X\u0026logoColor=white)](https://twitter.com/nicolaou_nicos)\n[![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://linkedin.com/in/nicos-nicolaou-a16720aa)\n[![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge\u0026logo=medium\u0026logoColor=white)](https://medium.com/@nicosnicolaou)\n[![Mastodon](https://img.shields.io/badge/-MASTODON-%232B90D9?style=for-the-badge\u0026logo=mastodon\u0026logoColor=white)](https://androiddev.social/@nicolaou_nicos)\n[![Bluesky](https://img.shields.io/badge/Bluesky-0285FF?style=for-the-badge\u0026logo=Bluesky\u0026logoColor=white)](https://bsky.app/profile/nicolaounicos.bsky.social)\n[![Dev.to blog](https://img.shields.io/badge/dev.to-0A0A0A?style=for-the-badge\u0026logo=dev.to\u0026logoColor=white)](https://dev.to/nicosnicolaou16)\n[![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?style=for-the-badge\u0026logo=YouTube\u0026logoColor=white)](https://www.youtube.com/@nicosnicolaou16)\n[![Static Badge](https://img.shields.io/badge/Developer_Profile-blue?style=for-the-badge\u0026label=Google)](https://g.dev/nicolaou_nicos)\n\nA modern and easy-to-use Android library for picking images and videos from the gallery or capturing\nthem with the camera. It offers a unified API for traditional Views (Activities/Fragments with XML)\nand Jetpack Compose. \u003cbr /\u003e\n\nNote: The example project does not include examples for all methods. \u003cbr /\u003e\n\n## 🌟 Features\n\nThis library is designed to simplify media selection in your Android app with a robust set of\nfeatures:\n\n* **🖼️ Single Image Picker**: Select a single image from the gallery.\n* **🎨 Multiple Image Picker**: Choose multiple images (up to 9).\n* **📸 Camera Capture**: Capture a new photo, with streamlined permission handling that can direct\n  users to app settings or can use the onPermanentCameraPermissionDenied() callback to implement\n  your own custom logic).\n* **📹 Video Picker**: Select a single video from the gallery.\n* **🔄 Base64 Conversion**: Automatically convert selected images to a Base64 string.\n* **✂️ Image Scaling**: Easily resize images to your desired dimensions.\n* **🚀 Jetpack Compose Support**: First-class support for Jetpack Compose, with dedicated\n  composables.\n\n---\n\n## 🤔 Why Use This Library?\n\n* **Unified API**: Supports both traditional Views (Activities/Fragments) and modern Jetpack Compose\n  UIs.\n* **Time-Saving**: Provides a simple, out-of-the-box solution to a common Android task, saving you\n  significant development time.\n* **Boilerplate Reduction**: Handles `ActivityResultLauncher`, permissions, and file processing,\n  letting you focus on your app's logic.\n* **Advanced Functionality**: Includes powerful features like Base64 encoding and image scaling\n  without needing extra dependencies.\n\n---\n\n### 🖼️ Preview (Demo)\n\n| Views (XML)                                                                                                 | Jetpack Compose                                                                                                                   |\n|-------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| \u003cimg src=\"examples/view.gif\" width=\"200\"\u003e                                                                   | \u003cimg src=\"examples/jetpack_compose.gif\" width=\"200\"\u003e                                                                              |\n| \u003cp align=\"center\"\u003e*[Demo project](https://github.com/NicosNicolaou16/ImagePickerAndroid/tree/main/app)*\u003c/p\u003e | \u003cp align=\"center\"\u003e*[Demo project](https://github.com/NicosNicolaou16/ImagePickerAndroid/tree/main/imagepickerandroidcompose)*\u003c/p\u003e |\n\n---\n\n### 🛠️ Versioning\n\n*   **JDK Version**: `17`\n*   **Target SDK**: `36`\n*   **Minimum SDK**: `24`\n*   **Kotlin Version**: `2.4.0`\n*   **Gradle Version**: `9.2.1`\n*   **Build Tool Version**: `36.0.0`\n\n---\n\n## !! IMPORTANT NOTE\n\nTHE BETA RELEASES MAY CONTAIN MAJOR OR MINOR CHANGES. \u003cbr /\u003e \u003cbr /\u003e\n\n---\n\n## 🚚 Migration Guide\n\n\u003e [!IMPORTANT]  \n\u003e Breaking changes from the version 2.3.0 and higher \u003cbr /\u003e \u003cbr /\u003e\n\u003e `takeSingleCameraImage()` changed to `takeSingleCameraImage(context = context)` \u003cbr /\u003e \u003cbr /\u003e\n\u003e `takeSingleCameraImageWithBase64Value()` changed to\n`takeSingleCameraImageWithBase64Value(context = context)`\n\n\u003e [!IMPORTANT]  \n\u003e Breaking changes from the version 2.4.0 and higher \u003cbr /\u003e \u003cbr /\u003e\n\u003e Added a new optional parameter `takeImageType: TakeImageType = TakeImageType.TAKE_IMAGE` (By\n\u003e default is `TakeImageType.TAKE_IMAGE`) \u003cbr /\u003e \u003cbr /\u003e\n\u003e Those parameters are used to select whether you want `ActivityResultContracts.TakePicture()` or\n\u003e `ActivityResultContracts.TakePicturePreview()`. \u003cbr /\u003e \u003cbr /\u003e\n\u003e The two options (enum) are `TakeImageType.TAKE_IMAGE` or\n`TakeImageType.TAKE_IMAGE_PREVIEW` \u003cbr /\u003e \u003cbr /\u003e\n\n```Kotlin\n// The two options (enum) are `TakeImageType.TAKE_IMAGE` or `TakeImageType.TAKE_IMAGE_PREVIEW`,\n// by default is `TakeImageType.TAKE_IMAGE`\nTakeSingleCameraImage(\n    scaleBitmapModel = null,\n    takeImageType = TakeImageType.TAKE_IMAGE,\n    listener = { bitmap, uri -\u003e\n        //...your code here\n    })\n\n// The two options (enum) are `TakeImageType.TAKE_IMAGE` or `TakeImageType.TAKE_IMAGE_PREVIEW`,\n// by default is `TakeImageType.TAKE_IMAGE`\nTakeSingleCameraImageWithBase64Value(\n    scaleBitmapModel = null,\n    takeImageType = TakeImageType.TAKE_IMAGE,\n    listener = { bitmap, uri, base64 -\u003e\n        //...your code here\n    })\n```\n\u003e [!IMPORTANT]  \n\u003e Breaking changes from the version 2.5.0 and higher \u003cbr /\u003e \u003cbr /\u003e\n\u003e\n\u003e Activity/Fragment/XML support \u003cbr /\u003e\n\u003e \n\u003e Implemented a check to ensure the image picker is available; no migration required. \u003cbr /\u003e\n\u003e Added a new optional callback `fun onImagePickerNotAvailable() { super.onImagePickerNotAvailable() }` \u003cbr /\u003e\n\u003e \n\u003e Compose Support \u003cbr /\u003e\n\u003e\n\u003e Added two new parameters to the Image Picker methods called in listener, one parameter is required, the second is optional. \u003cbr /\u003e\n\u003e - context (required) \u003cbr /\u003e\n\u003e - onImagePickerNotAvailable (optional) \u003cbr /\u003e\n\u003e \n\u003e Note for both types (Activity/Fragment/XML/Compose support): When the image is not available there is a Log.w(...), show only when the BuildConfig.DEBUG is true. \u003cbr /\u003e\n```logcatfilter\nImagePickerAndroid      com.nicos.imagepickerandroidcompose  W  Image Picker is not available\n```\n\n```Kotlin\npickSingleImage(context = context, onImagePickerNotAvailable = {\n  // show custom dialog - showDialog.value = true\n})\npickSingleImageWithBase64Value(context = context, onImagePickerNotAvailable = {\n  // show custom dialog - showDialog.value = true\n})\npickMultipleImages(context = context, onImagePickerNotAvailable = {\n  // show custom dialog - showDialog.value = true\n})\npickMultipleImagesWithBase64Values(context = context, onImagePickerNotAvailable = {\n  // show custom dialog - showDialog.value = true\n})\n```\n\n\u003e [!IMPORTANT]  \n\u003e Breaking changes from the version 2.5.6 and higher \u003cbr /\u003e \u003cbr /\u003e\n\u003e\n\u003e Activity/Fragment/XML support \u003cbr /\u003e\n\u003e\n\u003e Implemented a check to ensure the image picker is available; no migration required. \u003cbr /\u003e\n\u003e Added a new optional callback `fun onImagePickerNotAvailable() { super.onImagePickerNotAvailable() }` \u003cbr /\u003e\n\u003e\n\u003e Compose Support \u003cbr /\u003e\n\u003e\n\u003e Removed the **context** parameter from the Image Picker methods, leaving only the optional listener parameter. \u003cbr /\u003e\n\u003e - context \u003c- NO NEED TO PASS THIS ANYMORE, SO REMOVE THE PARAMETER \u003cbr /\u003e\n\u003e - onImagePickerNotAvailable (optional) \u003cbr /\u003e\n\u003e\n\u003e Note for both types (Activity/Fragment/XML/Compose support): When the image is not available there is a Log.w(...), show only when the BuildConfig.DEBUG is true. \u003cbr /\u003e\n```logcatfilter\nImagePickerAndroid      com.nicos.imagepickerandroidcompose  W  Image Picker is not available\n```\n\n```Kotlin\npickSingleImage(onImagePickerNotAvailable = {\n  // show custom dialog - showDialog.value = true\n})\npickSingleImageWithBase64Value(onImagePickerNotAvailable = {\n  // show custom dialog - showDialog.value = true\n})\npickMultipleImages(onImagePickerNotAvailable = {\n  // show custom dialog - showDialog.value = true\n})\npickMultipleImagesWithBase64Values(onImagePickerNotAvailable = {\n  // show custom dialog - showDialog.value = true\n})\n```\n\n---\n\n## ⚙️ Basic Configuration (Gradle Dependencies)\n\n\u003e [!IMPORTANT]  \n\u003e Check my article with the implementation \u003cbr /\u003e\n\u003e :point_right: [ImagePickerAndroid - My Android Image Picker Library 🧑‍💻 - Medium](https://medium.com/@nicosnicolaou/imagepickerandroid-my-android-image-picker-library-d1ac86c60e3a) :point_left: \u003cbr /\u003e\n\n### Groovy\n\n```Groovy\nimplementation 'com.github.NicosNicolaou16:ImagePickerAndroid:2.5.8'\n```\n\n```Groovy\nallprojects {\n    repositories {\n        maven { url \"https://jitpack.io\" }\n    }\n}\n```\n\n### Kotlin DSL\n\n```Kotlin\nimplementation(\"com.github.NicosNicolaou16:ImagePickerAndroid:2.5.8\")\n```\n\n```Kotlin\ndependencyResolutionManagement {\n    //...\n    repositories {\n        //...\n        maven { url = uri(\"https://jitpack.io\") }\n    }\n}\n```\n\n### libs.versions.toml\n\n```toml\n[versions]\n# other versions here...\nimagePickerAndroid = \"2.5.8\"\n\n[libraries]\n# other libraries here...\nimage-picker-android = { group = \"com.github.NicosNicolaou16\", name = \"ImagePickerAndroid\", version.ref = \"imagePickerAndroid\" }\n```\n\n```Kotlin\nimplementation(libs.image.picker.android)\n```\n\n```Kotlin\ndependencyResolutionManagement {\n    //...\n    repositories {\n        //...\n        maven { url = uri(\"https://jitpack.io\") }\n    }\n}\n```\n\n---\n\n## 🚀 Standard Configuration (XML)\n\n### Step 1 - Get Instance\n\n```Kotlin\nclass MainActivity : AppCompatActivity(), ImagePickerInterface {\n    //...\n    private var imagePicker: ImagePicker? = null\n\n    //...\n    fun initImagePicker() {\n        //Builder\n        //Note: fragmentActivity or fragment are mandatory one of them\n        imagePicker = ImagePicker(\n            fragmentActivity = this, //activity instance - private\n            fragment = this, // fragment instance - private\n            coroutineScope = lifecycleScope, // mandatory - coroutine scope from activity or fragment - private\n            scaleBitmapModelForSingleImage = ScaleBitmapModel(\n                height = 100,\n                width = 100\n            ), // optional, change the scale for image, by default is null\n            scaleBitmapModelForMultipleImages = ScaleBitmapModel(\n                height = 100,\n                width = 100\n            ), // optional, change the scale for image, by default is null\n            scaleBitmapModelForCameraImage = ScaleBitmapModel(\n                height = 100,\n                width = 100\n            ), // optional, change the scale for image, by default is null\n            enabledBase64ValueForSingleImage = true, // optional, by default is false - private\n            enabledBase64ValueForMultipleImages = true, // optional, by default is false - private\n            enabledBase64ValueForCameraImage = true, // optional, by default is false - private\n            imagePickerInterface = this, // call back interface\n            shouldRedirectedToSettingsIfPermissionDenied = false // optional, by default is true - private, if it set false, need to call the callback onPermanentCameraPermissionDenied()\n        )\n        //...other image picker initialization method(s)\n    }\n    //...\n}\n```\n\n### Step 2 - Initialize the methods for Image Pickers (choose the preferred method(s))\n\n```Kotlin\nimagePicker?.initPickSingleImageFromGalleryResultLauncher()\n\nimagePicker?.initPickMultipleImagesFromGalleryResultLauncher()\n\nimagePicker?.initTakePhotoWithCameraResultLauncher()\n\nimagePicker?.initPickSingleVideoFromGalleryResultLauncher()\n```\n\n### Step 3 Call from Click Listeners (choose the preferred method(s))\n\n```Kotlin\nimagePicker?.pickSingleImageFromGallery()\n\nimagePicker?.pickMultipleImagesFromGallery()\n\nimagePicker?.takeSinglePhotoWithCamera()\n\nimagePicker?.pickSingleVideoFromGallery()\n```\n\n### Step 4 - Callbacks (Optionals)\n\n```Kotlin\nclass MainActivity : AppCompatActivity(), ImagePickerInterface {\n    //...\n    override fun onGallerySingleImage(bitmap: Bitmap?, uri: Uri?) {\n        super.onGalleryImage(bitmap, uri)\n        //...your code here\n    }\n\n    override fun onCameraImage(bitmap: Bitmap?) {\n        super.onCameraImage(bitmap)\n        //...your code here\n    }\n\n    override fun onMultipleGalleryImages(\n        bitmapList: MutableList\u003cBitmap\u003e?,\n        uriList: MutableList\u003cUri\u003e?\n    ) {\n        super.onMultipleGalleryImages(bitmapList, uriList)\n        //...your code here\n    }\n\n    override fun onGallerySingleImageWithBase64Value(\n        bitmap: Bitmap?,\n        uri: Uri?,\n        base64AsString: String?\n    ) {\n        super.onGalleryImage(bitmap, uri, base64AsString)\n        //...your code here\n    }\n\n    override fun onCameraImageWithBase64Value(bitmap: Bitmap?, base64AsString: String?) {\n        super.onCameraImage(bitmap, base64AsString)\n        //...your code here\n    }\n\n    override fun onMultipleGalleryImagesWithBase64Value(\n        bitmapList: MutableList\u003cBitmap\u003e?,\n        uriList: MutableList\u003cUri\u003e?,\n        base64AsStringList: MutableList\u003cString\u003e?\n    ) {\n        super.onMultipleGalleryImages(bitmapList, uriList, base64AsStringList)\n        //...your code here\n    }\n\n    override fun onGallerySingleVideo(uri: Uri?) {\n        super.onGallerySingleVideo(uri)\n        //...your code here\n    }\n\n    // Need to call and set the shouldRedirectedToSettingsIfPermissionDenied = false from builder to use this callback\n    override fun onPermanentCameraPermissionDenied() {\n        super.onPermanentCameraPermissionDenied()\n        //...your code here\n    }\n\n    override fun onImagePickerNotAvailable() {\n      super.onImagePickerNotAvailable()\n      //...your code here\n    }\n}\n```\n\n---\n\n## 🚀 Compose Configuration\n\n### Step 1 - Initialize the Callbacks (Optionals)\n\n```Kotlin\nPickSingleImage(\n    scaleBitmapModel = ScaleBitmapModel(\n        height = 100,\n        width = 100\n    ), listener = { bitmap, uri -\u003e\n        //...your code here\n    })\n\nPickSingleImageWithBase64Value(\n    scaleBitmapModel = null,\n    listener = { bitmap, uri, base64 -\u003e\n        //...your code here\n    })\n\nPickMultipleImages(\n    scaleBitmapModel = null,\n    listener = { bitmapList, uriList -\u003e\n        //...your code here\n    })\n\nPickMultipleImagesWithBase64Values(\n    scaleBitmapModel = null,\n    listener = { bitmapList, uriList, base64List -\u003e\n        //...your code here\n    })\n\n// The two options (enum) are `TakeImageType.TAKE_IMAGE` or `TakeImageType.TAKE_IMAGE_PREVIEW`,\n// by default is `TakeImageType.TAKE_IMAGE`\nTakeSingleCameraImage(\n    scaleBitmapModel = null,\n    takeImageType = TakeImageType.TAKE_IMAGE,\n    listener = { bitmap, uri -\u003e\n        //...your code here\n    })\n\n// The two options (enum) are `TakeImageType.TAKE_IMAGE` or `TakeImageType.TAKE_IMAGE_PREVIEW`,\n// by default is `TakeImageType.TAKE_IMAGE`\nTakeSingleCameraImageWithBase64Value(\n    scaleBitmapModel = null,\n    takeImageType = TakeImageType.TAKE_IMAGE,\n    listener = { bitmap, uri, base64 -\u003e\n        //...your code here\n    })\n\nPickSingleVideo(listener = { uri -\u003e\n    //...your code here\n})\n```\n\n### Step 2 Call from Click Listeners (choose the preferred method(s))\n\n```Kotlin\npickSingleImage(onImagePickerNotAvailable = {\n      // show custom dialog - showDialog.value = true\n})\n\npickSingleImageWithBase64Value(onImagePickerNotAvailable = {\n    // show custom dialog - showDialog.value = true \n})    \n\npickMultipleImages(onImagePickerNotAvailable = {\n    // show custom dialog - showDialog.value = true\n})\n\npickMultipleImagesWithBase64Values(onImagePickerNotAvailable = {\n    // show custom dialog - showDialog.value = true\n})\n\n/**\n * onPermanentCameraPermissionDeniedCallBack is optional\n * */\ntakeSingleCameraImage(context = context, onPermanentCameraPermissionDeniedCallBack {\n    // show custom dialog - showDialog.value = true\n})\n\ntakeSingleCameraImageWithBase64Value(context = context, onPermanentCameraPermissionDeniedCallBack {\n    // show custom dialog - showDialog.value = true\n})\n\npickSingleVideo()\n```\n\n### Example for Compose Implementation\n\n```kotlin\n@Composable\nfun ImagePicker() {\n    val context = LocalContext.current\n    val bitmapValue = remember {\n        mutableStateOf(Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888))\n    }\n    //Initialize the call back\n    PickSingleImage(scaleBitmapModel = null, listener = { bitmap, uri -\u003e\n        if (bitmap != null) {\n            bitmapValue.value = bitmap\n        }\n    })\n    Column(\n        modifier = Modifier.fillMaxSize(),\n        verticalArrangement = Arrangement.spacedBy(20.dp, alignment = Alignment.Top),\n        horizontalAlignment = Alignment.CenterHorizontally,\n    ) {\n        //other code\n        Button(modifier = Modifier.size(150.dp, 50.dp), onClick = {\n            //pick image from the gallery \n            pickSingleImage(context = context, onImagePickerNotAvailable = {})\n        }) {\n            Text(\n                text = stringResource(R.string.pick_single_image),\n                style = TextStyle(textAlign = TextAlign.Center)\n            )\n        }\n        //other code\n    }\n}\n```\n\n---\n\n## ⭐ Stargazers\n\nIf you enjoy this project, please give it a star!\nCheck out all the stargazers\nhere: [Stargazers on GitHub](https://github.com/NicosNicolaou16/ImagePickerAndroid/stargazers)\n\n---\n\n## 🙏 Support \u0026 Contributions\n\nThis library is actively maintained. Feedback, bug reports, and feature requests are welcome! Please feel free to **open an issue** or submit a **pull request**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicosnicolaou16%2Fimagepickerandroid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicosnicolaou16%2Fimagepickerandroid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicosnicolaou16%2Fimagepickerandroid/lists"}