You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on voice search i load the search term to another fragment and execute an async task that contains the following lines of code...... Upon entering doInBackground the app crashes with voice seach. But the normal search using text works anyways !
override fun doInBackground(vararg params: ArrayList<String>?): List<Contractor> {
if(params[0]==null){ // Program stop here and crashes
Log.i("ViewContractsFragment","ArrayList is empty")
}
}
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.servicetap, PID: 21895
java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Iterator java.util.ArrayList.iterator()' on a null object reference
at com.michaelgarnerdev.materialsearchview.MaterialSearchView.onError(MaterialSearchView.java:1753)
at android.speech.SpeechRecognizer$InternalListener$1.handleMessage(SpeechRecognizer.java:451)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6863)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
The text was updated successfully, but these errors were encountered:
on voice search i load the search term to another fragment and execute an async task that contains the following lines of code...... Upon entering doInBackground the app crashes with voice seach. But the normal search using text works anyways !
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.servicetap, PID: 21895
java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Iterator java.util.ArrayList.iterator()' on a null object reference
at com.michaelgarnerdev.materialsearchview.MaterialSearchView.onError(MaterialSearchView.java:1753)
at android.speech.SpeechRecognizer$InternalListener$1.handleMessage(SpeechRecognizer.java:451)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6863)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
The text was updated successfully, but these errors were encountered: