Complete the implementation of setResultAndFinish() by setting a result with the code RESULT_OK and creating an intent that includes an extra with the key Intent.EXTRA_TEXT holding the value returned from the getTextResult() function. Conclude the process by closing the activity.
You have access to the
getTextResult() function in the given scope, and it's important to note that you are currently operating within an activity context.