-
-
Save KatieBarnett/be9875de29908a2c42d3b86c44a027d6 to your computer and use it in GitHub Desktop.
Wear OS inout multi capturing results
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val launcher = rememberLauncherForActivityResult( | |
ActivityResultContracts.StartActivityForResult() | |
) { | |
it.data?.let { data -> | |
val results: Bundle = RemoteInput.getResultsFromIntent(data) | |
val newInputText1: CharSequence = results.getCharSequence(inputTextKey1) ?: "" | |
val newInputText2: CharSequence = results.getCharSequence(inputTextKey2) ?: "" | |
val newInputText3: CharSequence = results.getCharSequence(inputTextKey3) ?: "" | |
userInput = "$newInputText1 $newInputText2 and $newInputText3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment