registerForActivityResult resultCode get 0 value
I'm trying to use registerForActivityResult but the result of it is 0, which mean that it doesn't get the result from the activity. The code was working perfectly last month when i did it, but i don't know why it made the error today, i tried to check for error in the code, but i dont think there is one.
Here is the function to use the camera :
private fun UseCamera() {
val takePictureIntent = Intent (MediaStore.ACTION_IMAGE_CAPTURE)
val imagePath =...