-
-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
Expected Behaviour
After permission left on IOS it wouldn't crash.
Actual Behaviour
After permission left on IOS, the plugin crash with com.apple.coreaudio.avfaudio', reason: 'required condition is false: nullptr == Tap()'
. Then, if i restart the app (permission already left) it works.
Reproduce Scenario (including but not limited to)
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 11.3
Cordova CLI version and cordova platform version
ionic info
@ionic/cli-plugin-proxy : 1.5.8
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.1.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v8.11.1
npm : 6.0.1
OS : Linux 4.13
Sample Code that illustrates the problem
import { Platform } from 'ionic-angular';
declare const SpeechRecognition: any;
@Injectable()
export class HomeService {
isRecording: boolean = false;
recognition: any;
constructor(public platform: Platform) {
this.platform.ready().then(() => {
this.recognition = new SpeechRecognition();
this.recognition.continuous = true;
this.recognition.interimResults = false;
this.recognition.lang = 'it-IT';
});
}
startListening() {
if (!this.isRecording) {
this.isRecording = true;
this.recognition.start();
}
}
stopListening() {
return new Promise((resolve, reject) => {
const that = this;
this.recognition.onresult = function(event) {
if (event.results[0][0].transcript !== undefined) {
const string = event.results[0][0].transcript;
if (typeof string === 'string') {
console.log(string);
resolve(string);
}
}
};
this.recognition.stop();
that.isRecording = false;
});
}
}
In my code on press of a button i call startListening() then after release the stopListening() method.
Logs taken while reproducing problem
com.apple.coreaudio.avfaudio', reason: 'required condition is false: nullptr == Tap()'
Metadata
Metadata
Assignees
Labels
No labels