Skip to content
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

SpeechRecognizer causing crash on SearchSupportFragment #37

Closed
NicolasDucom opened this issue Sep 21, 2020 · 2 comments
Closed

SpeechRecognizer causing crash on SearchSupportFragment #37

NicolasDucom opened this issue Sep 21, 2020 · 2 comments
Labels
bug Something isn't working external bug A bug in a dependency used by one of the sample apps

Comments

@NicolasDucom
Copy link

For some devices that don't have microphones (Vestel 17OPS15, Zappiti 4K HDR etc...), the SpeechRecognizer service is causing my app to crash when using a SearchSupportFragment().
I don't have any logic regarding Voice recognition in my own code, the problem is caused by the releaseRecognizer() method called in onPause() :
Caused by java.lang.IllegalArgumentException: Service not registered: android.speech.SpeechRecognizer$Connection@3cde2b3d at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1029) at android.app.ContextImpl.unbindService(ContextImpl.java:1808) at android.content.ContextWrapper.unbindService(ContextWrapper.java:551) at android.speech.SpeechRecognizer.destroy(SpeechRecognizer.java:408) at androidx.leanback.app.SearchSupportFragment.releaseRecognizer(SearchSupportFragment.java:440) at androidx.leanback.app.SearchSupportFragment.onPause(SearchSupportFragment.java:416)
This issue is a more or less a duplicate of an issue opened in the old androidtv-leanback repo, I wanted to know if any progress has been made regarding this problem, would it be simpler for me to open an issue on the Issuetracker ?
I'm using androidx.leanback:leanback:1.0.0

@IanGClifton
Copy link
Contributor

Hi Nicolas. Since this looks like an issue with the Leanback SDK itself, it'd be better to file this crash on the issue tracker, but you can add a link to the issue from here so that others who encounter it via these samples can go there and add more info or follow the issue. At this point, treating speech as a separate input is a bit outdated (e.g., Gboard for ATV can accept voice input directly and won't require each ATV app to request the audio permission), so I'm not sure if the fix is going to be graceful handling of devices without a mic or removing the special logic and leaning more on the keyboard.

@IanGClifton IanGClifton added bug Something isn't working external bug A bug in a dependency used by one of the sample apps labels Sep 22, 2020
@IanGClifton
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external bug A bug in a dependency used by one of the sample apps
Projects
None yet
Development

No branches or pull requests

2 participants