I am trying to create a File using the URI from ActivityResultContracts like this:
val galleryLauncher = rememberLauncherForActivityResult(ActivityResultContracts.GetContent()) { uri ->
val myFile = uri?.toFile()
The file is a jpeg image. I have got this error: Uri lacks 'file' scheme: content://com.android.providers.media.documents/document/image%3A1000000001