Companion

object Companion

Companion object containing the methods for choosing a photo from the Gallery as the custom puzzle image.

Functions

chooseFromGallery
Link copied to clipboard
fun chooseFromGallery(activity: Activity, galleryLauncher: ActivityResultLauncher<Intent>)
Obtains the necessary permission for choosing an image from the Gallery.
chooseFromGalleryIntent
Link copied to clipboard
private fun chooseFromGalleryIntent(galleryLauncher: ActivityResultLauncher<Intent>)
Launches the Gallery should the user decide to choose an image from it.
permissionsResultGallery
Link copied to clipboard
fun permissionsResultGallery(grantResults: IntArray, context: Context, galleryLauncher: ActivityResultLauncher<Intent>)
Defines the behavior depending on whether the user granted (or denied) the necessary permission for choosing an image from the Gallery.