Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
photopicker
Cette bibliothèque fournit une intégration pour Compose et Android Views pour le sélecteur de photos intégré.
Dernière mise à jour |
Version stable |
Version finale |
Version bêta |
Version alpha |
4 juin 2025 |
- |
- |
- |
1.0.0-alpha01 |
Déclarer des dépendances
Pour ajouter une dépendance à PhotoPicker, vous devez ajouter le dépôt Maven de Google à votre projet. Pour en savoir plus, consultez la section Dépôt Maven de Google.
Ajoutez les dépendances correspondant aux artefacts dont vous avez besoin dans le fichier build.gradle
de votre application ou de votre module :
Groovy
dependencies {
// For apps using Compose
implementation "androidx.photopicker:photopicker-compose:1.0.0-alpha01"
// For apps using Android views
implementation "androidx.photopicker:photopicker:1.0.0-alpha01"
}
Kotlin
dependencies {
// For apps using Compose
implementation("androidx.photopicker:photopicker-compose:1.0.0-alpha01")
// For apps using Android views
implementation("androidx.photopicker:photopicker:1.0.0-alpha01")
}
Pour en savoir plus sur les dépendances, consultez Ajouter des dépendances de compilation.
Commentaires
Vos commentaires nous aident à améliorer Jetpack. N'hésitez pas à nous contacter si vous découvrez de nouveaux problèmes ou si vous avez des idées pour améliorer cette bibliothèque. Veuillez consulter les problèmes existants de cette bibliothèque avant d'en signaler un nouveau. Vous pouvez ajouter votre vote à un problème existant en cliquant sur le bouton en forme d'étoile.
Signaler un nouveau problème
Pour en savoir plus, consultez la documentation sur l'outil Issue Tracker.
Aucune note de version pour cet artefact.
Version 1.0
Version 1.0.0-alpha01
4 juin 2025
Publication d'androidx.photopicker:photopicker:1.0.0-alpha01
, androidx.photopicker:photopicker-compose:1.0.0-alpha01
et androidx.photopicker:photopicker-testing:1.0.0-alpha01
. La version 1.0.0-alpha01 contient ces commits.
Nouvelles fonctionnalités
- Version alpha initiale des implémentations androidx du sélecteur de photos intégré qui permet aux applications basées sur View et Compose de s'intégrer facilement au service Sélecteur de photos intégré.
Modifications apportées à l'API
- Ajout du composable
EmbeddedPhotopicker
en tant que point d'entrée pour les applications basées sur Compose.
- Vous pouvez utiliser
rememberEmbeddedPhotoPickerState
(recommandé) ou les applications peuvent implémenter leur propre gestion de l'état avec l'interface EmbeddedPhotoPickerState
.
- Ajout de
EmbeddedPhotopickerView
en tant que point d'entrée pour les applications basées sur les vues.
EmbeddedPhotoPickerStateChangeListener
peut être utilisé pour recevoir des rappels liés à l'état dans le PhotoPicker.
- Ajout de
TestEmbeddedPhotoPickerProvider
pour permettre aux applications de tester les flux qui reposent sur le sélecteur de photos intégré.
Le contenu et les exemples de code de cette page sont soumis aux licences décrites dans la Licence de contenu. Java et OpenJDK sont des marques ou des marques déposées d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/27 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/27 (UTC)."],[],[],null,["# photopicker\n===========\n\nAPI Reference \n[androidx.photopicker](/reference/kotlin/androidx/photopicker/package-summary) \nThis library provides an integration for Compose and Android Views for the embedded photo picker. \n\n| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |\n|---------------|----------------|-------------------|--------------|-----------------------------------------------------------------------|\n| June 4, 2025 | - | - | - | [1.0.0-alpha01](/jetpack/androidx/releases/photopicker#1.0.0-alpha01) |\n\nDeclaring dependencies\n----------------------\n\nTo add a dependency on PhotoPicker, you must add the Google Maven repository to your\nproject. Read [Google's Maven repository](/studio/build/dependencies#google-maven)\nfor more information.\n\nAdd the dependencies for the artifacts you need in the `build.gradle` file for\nyour app or module: \n\n### Groovy\n\n```groovy\ndependencies {\n // For apps using Compose\n implementation \"androidx.photopicker:photopicker-compose:1.0.0-alpha01\"\n // For apps using Android views\n implementation \"androidx.photopicker:photopicker:1.0.0-alpha01\"\n}\n \n```\n\n### Kotlin\n\n```kotlin\ndependencies {\n // For apps using Compose\n implementation(\"androidx.photopicker:photopicker-compose:1.0.0-alpha01\")\n // For apps using Android views\n implementation(\"androidx.photopicker:photopicker:1.0.0-alpha01\")\n}\n \n```\n\nFor more information about dependencies, see [Add build dependencies](/studio/build/dependencies).\n\nFeedback\n--------\n\nYour feedback helps make Jetpack better. Let us know if you discover new issues or have\nideas for improving this library. Please take a look at the\n[existing issues](https://issuetracker.google.com/issues?q=componentid:1815792%20status:open)\nin this library before you create a new one. You can add your vote to an existing issue by\nclicking the star button.\n\n[Create a new issue](https://issuetracker.google.com/issues/new?component=1815792&template=2142352)\n\nSee the [Issue Tracker documentation](https://developers.google.com/issue-tracker)\nfor more information.\n\nThere are no release notes for this artifact.\n\nVersion 1.0\n-----------\n\n### Version 1.0.0-alpha01\n\nJune 4, 2025\n\n`androidx.photopicker:photopicker:1.0.0-alpha01`, `androidx.photopicker:photopicker-compose:1.0.0-alpha01`, and `androidx.photopicker:photopicker-testing:1.0.0-alpha01` are released. Version 1.0.0-alpha01 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/786176dc2284c87a0e620477608e0aca9adeff15/photopicker).\n\n**New Features**\n\n- The initial alpha release of androidx implementations of the [Embedded PhotoPicker](https://developer.android.com/reference/android/widget/photopicker/package-summary) that enable both View based and Compose based applications to easily integrate with the Embedded Photopicker service.\n\n**API Changes**\n\n- Added `EmbeddedPhotopicker` composable for as an entrypoint for compose based applications.\n - `rememberEmbeddedPhotoPickerState` can be used (recommended) or applications can implement their own state management with the `EmbeddedPhotoPickerState` interface.\n- Added `EmbeddedPhotopickerView` as an entrypoint for view based applications.\n - `EmbeddedPhotoPickerStateChangeListener` can be used to receive related callbacks to state inside the PhotoPicker.\n- Added `TestEmbeddedPhotoPickerProvider` to allow apps to test flows that rely on the Embedded Photopicker."]]