In an Activity, I can choose an image from the Gallery, and I need its Uri path (in the log, the Uri path for my test image is /content:/media/external/images/media/1<
/content:/media/external/images/media/1<
val inputStream = context.contentResolver.openInputStream(uri)
is all you need.