-
Notifications
You must be signed in to change notification settings - Fork 250
Adds Wear module and voice input snippet #280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
kul3r4
commented
Jun 10, 2024
- Adds a Wear module
- Adds a snippet to replace outdated code in https://developer.android.com/training/wearables/user-input/voice#kotlin
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
// This is where you process the intent and extract the speech text from the intent. | ||
it.data?.let { data -> | ||
val results = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS) | ||
textForVoiceInput = results?.get(0) ?: "None" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be better as a nullable string, instead of using "None"?
wear/src/main/java/com/example/wear/snippets/voiceinput/VoiceInputScreen.kt
Show resolved
Hide resolved
wear/src/main/java/com/example/wear/snippets/voiceinput/VoiceInputScreen.kt
Outdated
Show resolved
Hide resolved
wear/src/main/java/com/example/wear/snippets/voiceinput/VoiceInputScreen.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs the build scripts and spotless :) Otherwise its looking great!
fd03da6
to
4b33b10
Compare