0

I have problem, because I have sth like this, to ask about permission, but now I cant receive foto result file when user want to save it.

registerForActivityResult(
        ActivityResultContracts.RequestPermission()
    ) { isGranted: Boolean ->
        if (isGranted) {
            open camera Intent
        } else {
            access denied
            ).show()
        }
    }

I write that I should use this code to receive foto, but where and how? :

private var imagePickerResultActivityLauncher  = registerForActivityResult(ActivityResultContracts.GetContent()){result ->
 //Do whatever you want to do with the result. the result is a Uri? 

}

sidgate
  • 14,650
  • 11
  • 68
  • 119
wenus
  • 1,345
  • 6
  • 24
  • 51

0 Answers0