ak1394 / react-native-tts

React Native Text-To-Speech library for Android and iOS
626 stars 159 forks source link

Warning new NativeEventEmitter #247

Open JorgeAntrax opened 1 year ago

JorgeAntrax commented 1 year ago

I am using react native 0.72.0 and console errors report me a wanring of 2 missing methods in the java module, if this module is still maintained please add the change to avoid warning and / or update the package with these settings:

`@ReactMethod public void addListener(String eventName) {

}

@ReactMethod
public void removeListeners(Integer count) {

}`
medamine980 commented 1 year ago

Where do exactly I have to put this methods to avoid the warnings?

fatidian1 commented 1 year ago

Where do exactly I have to put this methods to avoid the warnings?

node_modules\react-native-tts\android\src\main\java\net\no_mad\tts\TextToSpeechModule.java - here, at the end of the class :)

JorgeAntrax commented 1 year ago

hi good morning i am integrated snippet in this file:

https://github.com/JorgeAntrax/react-native-speech/compare/master...ak1394:react-native-tts:master#diff-57bfb1f48cb13a06b139b770dda0107085b3137db5431b45122de090760ea34f

JorgeAntrax commented 1 year ago

image

atanu3000 commented 8 months ago

Thank you. It works perfectly. No warning is got now.