Crash in SearchSupportFragment at onStop #118
Comments
Hello. |
Which version of the OS are you testing on? |
Hi, I've come across this issue as well but to me it happened in the The steps to reproduce the issue are quite straightforward:
|
Yes. |
yes same things happened to me while developing the application so here is the fix for this ` mFragment = (SearchFragment) getFragmentManager().findFragmentById(R.id.search_fragment);
|
@anurag7141 , I will like to ask what the R.id.search_fragment is actually referencing, is that being called from a layout, and I will so much appreciate if you can share the layout as well. Thanks. |
Hi meshileya,
|
Thanks @anurag7141 , I will get back to you on this...will want to make the quick fix from my end. |
Same problem. If youre decided this problem write me on andreyriz2909@gmail.com. |
So, instead of manually starting activity, I think a better workaround would be setting an empty callback on devices with unavailable speech recognition (inside if (!SpeechRecognizer.isRecognitionAvailable(context)) {
setSpeechRecognitionCallback { }
} |
Thx =)
вт, 10 сент. 2019 г. в 10:28, Dmitry Akishin <notifications@github.com>:
… setSpeechRecognitionCallback is deprecated:
Deprecated: Launching voice recognition activity is no longer supported.
App should declare android.permission.RECORD_AUDIO in AndroidManifest file.
I think, a better workaround would be setting callback only on devices
with unavailable speech recognition (inside onCreate() of your
SearchFragment):
if (!SpeechRecognizer.isRecognitionAvailable(context)) {
setSpeechRecognitionCallback { } }
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#118>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI7EK5OIOMLMD6HNGNZ2B3LQI5EA5ANCNFSM4E7FQMRA>
.
|
This sample has been migrated to a new location and updates are happening there (check README for more information). As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived. If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you! |
Hi.
I'm working with SearchSupportFragment, but when stop, app crashes at onStop with error:
SearchFragment Service not registered: android.speech.SpeechRecognizer.
Please help me.
I'm using
com.android.support:leanback-v17:27.1.1
Thank! so much.
The text was updated successfully, but these errors were encountered: