Assume that we have an app with two activities. To open the second activity from the first activity, the first activity uses an intent. The intent contains an extra of string type with the key Intent.EXTRA_TEXT.
The function getMessage() below is in the second activity and returns a nullable string. Finish implementing the function so that it returns the extra delivered to the second activity.
You have access to
intent, the intent used to launch the activity. You can also access it using the getIntent() method.