Closed nithusv closed 3 years ago
Thanks. But when clicking on voice selection menu in the demo app, the app crashes. Please look into it.
@nithusv please post here the exception you get when running it. Tested on my devices without issues.
@gotev
If I click Set Speech to text language option the app freezes and it quits. (I think it is doing network operation or a heavy operation on ui thread, maybe moving it to background thread may solve it)
This was the exception caught, Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.resolveTypeIfNeeded(android.content.ContentResolver)' on a null object reference at android.app.ContextImpl.sendOrderedBroadcast(ContextImpl.java:1229) at android.app.ContextImpl.sendOrderedBroadcast(ContextImpl.java:1185) at android.content.ContextWrapper.sendOrderedBroadcast(ContextWrapper.java:493) at net.gotev.speech.Speech.getSupportedSpeechToTextLanguages(Speech.java:343) at net.gotev.speechdemo.MainActivity.onSetSpeechToTextLanguage(MainActivity.java:115) at net.gotev.speechdemo.MainActivity.onOptionsItemSelected(MainActivity.java:102) at android.app.Activity.onMenuItemSelected(Activity.java:4150) at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:436) at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:196) at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109) at androidx.appcompat.app.AppCompatDelegateImpl.onMenuItemSelected(AppCompatDelegateImpl.java:888) at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840) at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158) at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991) at androidx.appcompat.view.menu.MenuPopup.onItemClick(MenuPopup.java:128) at android.widget.AdapterView.performItemClick(AdapterView.java:330) at android.widget.AbsListView.performItemClick(AbsListView.java:1257) at android.widget.AbsListView$PerformClick.run(AbsListView.java:3265) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7697) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Thanks for the report. On which Android version does it happen? Also, do you have the Google App installed?
I have google app installed running on Android 10.
@nithusv try version 1.6.0
and let me know
@gotev It is working fine now. ⭐️
Yes. Check https://github.com/gotev/android-speech#set-speech-to-text-language-and-text-to-speech-voice