https://github.com/leoando/android13-photo-picker-samples
Sample for Photo picker (Android 13+)
https://github.com/leoando/android13-photo-picker-samples
android-compose android-java android-kotlin android13 java11 material3 tiramisu
Last synced: about 1 year ago
JSON representation
Sample for Photo picker (Android 13+)
- Host: GitHub
- URL: https://github.com/leoando/android13-photo-picker-samples
- Owner: LeoAndo
- Created: 2022-02-20T22:09:39.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-13T02:10:32.000Z (about 3 years ago)
- Last Synced: 2025-03-24T14:51:21.457Z (about 1 year ago)
- Topics: android-compose, android-java, android-kotlin, android13, java11, material3, tiramisu
- Language: Kotlin
- Homepage:
- Size: 15.8 MB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Overview
Sample for [Photo picker](https://developer.android.com/about/versions/13/features#photo-picker) (Android 13 +)
[日本語版 README](https://github.com/LeoAndo/android-photo-picker-samples/tree/main/README_JP)
# development environment

# Dev Memo
- Photo picker allows you to access Media without Runtime Permission
- [Define sharing limitations](https://developer.android.com/about/versions/13/features/photopicker#define_sharing_limitations)
- The value of this intent-extra should be a positive integer greater than 1 and less than or equal to [MediaStore#getPickImagesMaxLimit](https://developer.android.com/reference/android/provider/MediaStore#getPickImagesMaxLimit()), otherwise Activity#RESULT_CANCELED is returned.
- The official documentation uses the deprecated onActivityResult, but you can use the recommended API ActivityResultLauncher.
- https://github.com/LeoAndo/ActivityResultContractsKotlinSample
- https://github.com/LeoAndo/ActivityResultContractsJavaSample
# Test Data
- mp4
- https://samplelib.com/sample-mp4.html
- png
- https://assets.pokemon.com/assets/cms2/img/pokedex/full/001.png
- https://assets.pokemon.com/assets/cms2/img/pokedex/full/500.png
# [For Compose](https://github.com/LeoAndo/android-photo-picker-samples/tree/main/PhotoPickerComposeSample)
- material3
- VideoView (AndroidView)
- Use Jetpack Library API
# [For Kotlin](https://github.com/LeoAndo/android-photo-picker-samples/tree/main/PhotoPickerKotlinSample)
- material2
- Use Jetpack Library API
# [For Java](https://github.com/LeoAndo/android-photo-picker-samples/tree/main/PhotoPickerJavaSample)
- use Java 11 API
- Material2
- Not Use Jetpack Library API
# Capture Pixel 4 API Tiramisu
| Compose | View |
|:---|:---:|
|
|
|
# refs
https://developer.android.com/about/versions/13/features#photo-picker
https://developer.android.com/about/versions/13/features/photopicker