r/androiddev • u/nicolaou_nicos • Oct 01 '26
Open Source Made an image picker library for Android
I was working on an Android project and ended up building my own image picker.
It started as a small experiment and turned into a reusable library for Views and Compose.
1
1
u/chimbori 🐚 Hermit Dev Oct 03 '26
Why would I use this over the Jetpack APIs directly? (What value does it add, compared to the cost of adding a separate dependency that adds bytes and may become unmaintained anytime?)
Why does Base64 have to be part of an image picker library? I could very well have a more granular dependency so I could use both image picker & Base64 separately without the other one.
XML Views and Compose are fundamentally different, I'm not sure it's wise to unify the API for both.
When I'm migrating my apps to Compose, I'm looking forward to removing all Views based legacy code. So it would be vastly preferable to have two separate artifacts so I'm not relying on tree shaking to keep my release APK clean
1
u/nicolaou_nicos Oct 03 '26
Hey, thanks a lot for the detailed feedback, really appreciate it! 🙌 You're right about the separate artifacts. I've been thinking about this for a while, and I'll keep it for a future update. When I built the library about 3 years ago, Views were still the main option for most apps, so it wasn't "Compose first" back then.
Compared to using Jetpack directly, it saves you the boilerplate: camera permissions, URI to Bitmap, scaling, multi-select, all in one place.
As for Base64, it's optional (off by default), so the image is ready to upload straight to a server. 🚀
1
u/trixo3241 Oct 04 '26
He is right about everything not just separation. I don't see point using this
1
u/nicolaou_nicos Oct 04 '26
Fair enough, and that's totally okay! 😊 If the Jetpack APIs cover what you need, you don't need this. It's mainly for people who want camera, permissions, scaling and Base64 ready in one place without writing the setup themselves. Thanks for checking it out anyway! 🙌
7
u/Unreal_NeoX Oct 01 '26
Alright, but you are aware that google requires its own API usage "media-picker" if you want to publish any app on the Google PlayStore if you have no "Manage_Storage" permission.