Add a photo and video picker to an Android app with one Gradle dependency and a few lines of Java or Kotlin code.
Let users crop and compress images before uploading, reducing server storage costs and upload time.
Embed the media picker as a fragment inside an existing screen instead of launching it as a separate activity.
Query a device's album and media lists programmatically without showing any UI, using the headless data-source mode.
PictureSelector is an Android library that gives your app a full-featured media picker. Users can browse their photo albums, select images, videos, or audio files, take new photos with the camera, crop and resize selections, and compress files before they are returned to the app. The library targets Android 5.0 and later, including Android 13's updated storage permissions. Adding the library to an Android project takes a single line in Gradle or Maven. Once it is installed, you open the picker with a few lines of Java or Kotlin code, choose what type of media to allow (images, video, audio, or all three), attach an image-loading engine, and provide a callback to receive the selected files. The library ships with adapters for three popular image-loading libraries: Glide, Picasso, and Coil. You pick whichever one your project already uses. The picker can run in several modes. The full gallery mode lets users browse and select from their existing media. A camera-only mode opens the device camera directly. You can also embed the picker as a fragment inside any existing view, which is useful when you want to build the selection UI into your own screen layout rather than launching a separate activity. There is also a headless data-source mode that lets you query album and media lists programmatically without showing any UI at all. Previewing selected files is supported too. The library can display images and videos in a built-in preview screen, with optional delete and download actions. Online video preview requires setting the cleartext traffic flag in the Android manifest. The library handles the Android runtime permission requests for camera, storage, and audio access, adapting to the different permission models across Android versions. Theming and visual customization are documented in the project wiki. ProGuard rules are provided to keep the library working in minified builds.
← lucksiege on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.