After upgrading from Iris version 9.2.64 to Iris version 9.2.72, our app crashes in the SpeechToText component (imported from the Volt MX Marketplace).
In Iris version 9.2.64, the SpeechToText component works fine, but in Iris version 9.2.72, that component is not working.
Note: Previously, we used Iris version 9.2.64 with Java JDK version 8, but now version 9.2.72 requires Java JDK version 11.
We are using this component: https://marketplace.hclvoltmx.com/items/voice-input-interface?search=speechto (version 1.0.0)
We have tested 2.0.2 version also having the same issue.
In this component, under Modules > NativeControllerAndroid, the app crashes at this line: this.mContext = this.KonyMain.getActivityContext();. Refer to the code below:
NativeControllerAndroid.prototype.importClasses = function() {
try {
konymp.logger.trace("----------Entering importClasses Function---------", konymp.logger.FUNCTION_ENTRY);
this.KonyMain = java.import('com.konylabs.android.KonyMain');
this.Locale = java.import("java.util.Locale");
this.recognizerIntent = java.import("android.speech.RecognizerIntent");
this.speechRecognizer = java.import("android.speech.SpeechRecognizer");
this.Intent = java.import("android.content.Intent");
this.contextCompat = java.import("androidx.core.content.ContextCompat");
this.manifest = java.import("android.Manifest");
this.packageManager = java.import("android.content.pm.PackageManager");
this.activityCompact = java.import("androidx.core.app.ActivityCompat");
this.permission = java.import("konymp.com.request.RequestPermission");
this.mLocale = this.Locale.getDefault();
this.mContext = this.KonyMain.getActivityContext();
this.recognitionListener = java.newClass('recognitionListener', 'java.lang.Object', ['android.speech.RecognitionListener'], {
onReadyForSpeech: this.onReadyForSpeechAndroid.bind(this),
onBeginningOfSpeech: this.onBeginningOfSpeechAndroid.bind(this),
onRmsChanged: this.onRmsChangedAndroid.bind(this),
onPartialResults: this.onPartialResultsAndroid.bind(this),
onResults: this.onResultsAndroid.bind(this),
onError: this.onErrorAndroid.bind(this),
onBufferReceived: this.onBufferReceivedAndroid.bind(this),
onEndOfSpeech: this.onEndOfSpeechAndroid.bind(this),
onEvent: this.onEventAndroid.bind(this)
});
this.requestPermission();
konymp.logger.trace("----------Exiting importClasses Function---------", konymp.logger.FUNCTION_EXIT);
} catch (exception) {
konymp.logger.error(JSON.stringify(exception), konymp.logger.EXCEPTION);
if(exception.type === "CUSTOM"){
throw exception;
}
}
};
Please provide a solution for this issue.