muhaos / react-native-speech-to-text-ios

React Native speech recognition component for iOS 10+
MIT License
40 stars 9 forks source link

Hide alert boxes #8

Closed martinblampied closed 7 years ago

martinblampied commented 7 years ago

Is it possible to hide/disable the alert boxes for errors and warnings? I want to be able to handle these errors silently.

muhaos commented 7 years ago

I can't find any internal alerts. All errors should be passed to JS side. The only one alert that I can see is in JavaScript Example. Can you please describe more details?

martinblampied commented 7 years ago

Talking about the alert boxes (see below). I want to be able to handle these messages myself.

simulator screen shot 4 may 2017 09 41 09

simulator screen shot 4 may 2017 09 40 36

martinblampied commented 7 years ago

@muhaos Any ideas?

It builds the errors in sendResult function then uses: [self.bridge.eventDispatcher sendAppEventWithName:@"SpeechToText" body:result];

Where do the AlertView's get built? I want to catch any errors in a console.log.

martinblampied commented 7 years ago

I'm an idiot.... it was the line alert(JSON.stringify(result.error));