ActivityResult
ActivityResult is a mechanism in Android development used for passing data back from an activity that was launched to perform a task. When one activity starts another for a result, it uses the startActivityForResult method. The launched activity then performs its task, and when it's finished, it can return a result to the original activity. This result typically includes a result code (indicating success or failure) and optionally, some data, often in the form of an Intent. The original activity receives this result in its onActivityResult callback method.
The startActivityForResult method requires a request code, which is an integer that uniquely identifies the request.
Common use cases for ActivityResult include picking a photo from the gallery, taking a picture with the