Skip to content

Instantly share code, notes, and snippets.

Coding from home

Davide Giuseppe Farella 4face-studi0

Coding from home
View GitHub Profile
* Copyright (C) 2014 The Android Open Source Project
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional


ianhanniballake / PickImageContracts.kt
Last active Mar 15, 2022
Gist showing how to write backward compatible ActivityResultContracts for supporting Android 13's new Photo Picker:
View PickImageContracts.kt
* Use this [ActivityResultContract] to seamlessly switch between
* the new [MediaStore.ACTION_PICK_IMAGES] and [Intent.ACTION_GET_CONTENT]
* based on the availability of the Photo Picker.
* Use [PickMultipleImages] if you'd like the user to be able to select multiple
* photos/videos.
* Input: the mimeType you'd like to receive. This should generally be
* either `image/\*` or `video/\*` for requesting only images or only videos