Repository navigation
Open apps by name with voice commands - #392
Open
ziyadmohamed wants to merge 4 commits into
Open
ziyadmohamed wants to merge 4 commits into
ziyadmohamed wants to merge 4 commits into
Conversation
trypsynth
requested changes
Oct 31, 2026
trypsynth
left a comment
Owner
There was a problem hiding this comment.
Thanks! Opening apps by name answers #244 well. It reuses the existing voice command path, it's off by default, and the strings and docs are done properly. Some things first:
- Please split it into two PRs: opening an app by name, and clicking a visible control by its label. The
HandlerCompat.hasCallbackschange in SpeechRecognizerPerformer is a real fix for Android 8 and 9 on its own, and I'm fixing that on master separately, so you can drop it. - Clicking by label is risky. Saying a visible label clicks it straight away with no confirmation, including "Delete", "Send", "Pay", "Uninstall" and keyboard keys.
VisibleVoiceTarget.windows()(VisibleVoiceTarget.kt:35-60) doesn't filter window types, so the keyboard, System UI and Backtalk's own windows are searched. And labels are matched before built-in commands, so a visible "Home", "Back" or "Settings" item takes over that command whenever the switch is on. Please match built-in commands first, and leave out the keyboard and Backtalk's own windows. - The new switch needs a
TalkBackPreferenceFilterentry withHIDDEN_ON_WATCH | HIDDEN_ON_TV, like the other voice command settings, because voice commands aren't on watches. - Minor: the differences.md section is under Backtalk menu, but it belongs with voice commands.
Merged
Owner
|
Thanks, this conflicts with master now. Could you rebase it, and I'll review it again? |
ziyadmohamed
force-pushed
the
voice-command-apps-and-visible-controls
branch
from
November 2, 2026 11:43
a12051a to
77d15f3
Compare
Author
|
Hi @trypsynth, the rebase is done and GitHub shows no merge conflicts. Validation on November 2 passed all 1,191 unit tests and both phone and watch lint checks. It's ready for another look when you have time. Thanks! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an "Open " command to Backtalk's existing voice commands, addressing #244. Instead of opening the app drawer and finding an icon, you can say something like "Open WhatsApp".
The "Open apps by voice" switch is under Controls in Backtalk settings. It is off by default and hidden on watches and TVs. Matching uses the full launcher or application label and requires at least 85% similarity. The closest match wins; equal matches belonging to different apps are rejected with the usual "command not recognized" message. Multiple launcher entries for the same app are allowed. The "Open" prefix is currently English.
App names are queried for each request, so installations, removals and disabled apps are picked up without restarting Backtalk. The lookup runs on a worker thread, and a newer command, disabling the setting or stopping the service cancels a pending launch. With the switch enabled, recognition waits for a final speech result so "Open YouTube" cannot launch halfway through "Open YouTube Music". A recognition error or timeout cannot turn an unfinished phrase into an app launch. Starting a call cancels a pending app launch, and opening an app clears an unanswered call confirmation. Other phrases use the existing command handler, and leaving the switch off preserves the existing recognition timing.
I previously tested opening apps on a Samsung Galaxy A24 running Android 16, configured with Multilingual TTS 1.82 and Google's recognition service. The setting, phone/watch/TV filtering and interaction with call confirmations are covered by automated tests; I have not retested these changes on the phone. The documentation is now in the Voice commands section of differences.md.
The full
testPhoneDebugUnitTestsuite passed all 1,191 tests, including 18 app-command checks.:lintPhoneDebugand:lintWearDebugalso passed. The tests cover fuzzy matching, ambiguous names and launcher aliases, failed or canceled launches, the default setting, phone/watch/TV filtering, interaction with call confirmations, and final speech results, errors and timeouts on Android 8 and Android 14.The separate change for clicking visible controls with confirmation is in #394.