I want to create an Android Gallery/Photos viewer that lets the user PICK a profile picture. Based on all the examples I looked at, this is my code for doing so.
val galleryIntent = Intent(Intent.ACTION_GET_CONTENT, MediaStore.Images.Media.EXTERNAL_CONTENT_URI)
galleryIntent.type = "image/*"
galleryIntentLauncher.launch(galleryIntent)
Unfortunately this opens to the root of some file system, but I want it to open directly to the Gallery or Google Photos or whatever is the correct location for the photo gallery on the device.
I realize this varies by manufacturer (OnePlus, Samsung, Google, etc.) and that may be the reason what I want to do is impossible, but I know I've seen other apps do it.
Is there some formal/common way of doing this (i.e. opening directly to the photo gallery instead of the root directory)?