We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e43ac8 commit 14db1b4Copy full SHA for 14db1b4
android/src/main/java/com/getcapacitor/community/speechrecognition/SpeechRecognition.java
@@ -335,10 +335,16 @@ public void onResults(Bundle results) {
335
try {
336
JSArray jsArray = new JSArray(matches);
337
338
- if (this.call != null && !this.partialResults) {
339
- this.call.resolve(
340
- new JSObject().put("status", "success").put("matches", jsArray)
341
- );
+ if (this.call != null) {
+ if (!this.partialResults) {
+ this.call.resolve(
+ new JSObject().put("status", "success").put("matches", jsArray)
342
+ );
343
+ } else {
344
+ JSObject ret = new JSObject();
345
+ ret.put("matches", jsArray);
346
+ notifyListeners("partialResults", ret);
347
+ }
348
}
349
} catch (Exception ex) {
350
this.call.resolve(
0 commit comments