skip to Main Content

Android Studio – SpeechRecognizerListener giving Bundle[EMPTY_PARCEL] in onResults(Bundle results) majority devices which have android 11

I am Using speech = SpeechRecognizer.createSpeechRecognizer(getReactApplicationContext().getApplicationContext()); speech.setRecognitionListener(VoiceAppModule.this); recognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); recognizerIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS, 100000000); recognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, "en"); recognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, "com.languageacademy"); recognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH); recognizerIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 3); recognizerIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS, 10000); recognizerIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS, 10000); The Above code for Speech recognition. @Override public void onResults(Bundle results) { in about On…

VIEW QUESTION

Android Studio – Add additional item to an item in model class array list

I have a data class @Parcelize data class PublicationPageModel( @SerializedName("pageNumber") val pageNumber: Int, @SerializedName("content") val content: String ): Parcelable I already added items to the array like this: private var publicationPageModel: ArrayList<PublicationPageModel> = arrayListOf() publicationPageModel.add(PublicationPageModel(finalPageNumber, fileContent)) Now, I want to…

VIEW QUESTION

Android Studio – How to add a TabItem by activity?

I need the TabLayout to have an "x" number of tabs, which can vary according to the user's data that is already in the database My xml: enter code here<com.google.android.material.tabs.TabLayout android:id="@+id/select_bar" android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:tabContentStart="32dp" app:tabMode="scrollable"> <com.google.android.material.tabs.TabItem android:id="@+id/posto1"…

VIEW QUESTION

Android Studio – Calling variables inside ViewHolder through Activity

In my RecyclerViewAdapter, part of my codes are below: @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.music_item_lists, parent, false); return new ViewHolder(v); } class ViewHolder extends RecyclerView.ViewHolder { EqualizerView equalizerView, equalizerr; CardView image_card; ViewHolder(View itemView) {…

VIEW QUESTION
Back To Top
Search