76.4 Handling Intent Results
When an intent returns control to the application, it does so by calling the onActivityResult() method of the activity which started the intent. This method is passed the request code that was handed to the intent at launch time, a result code indicating whether or not the intent was successful and a result data object containing the Uri of the selected file. The following code, for example, might be used as the basis for handling the results from the ACTION_OPEN_DOCUMENT intent outlined in the previous section:
public override fun onActivityResult(requestCode: Int, resultCode: Int,
resultData: Intent?) {
var currentUri: Uri? = null
if (resultCode == Activity...