From 8c025ef19cc871c78b44960597ecce4cfd739c7f Mon Sep 17 00:00:00 2001 From: Rodrigo Martin Date: Tue, 26 Apr 2022 23:39:39 +0200 Subject: [PATCH] fix(Android): Add RN 0.65 event emitter stubs (#151) --- .../asterinet/react/tcpsocket/TcpSocketModule.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java b/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java index 54b022c..297da65 100644 --- a/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java +++ b/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java @@ -182,6 +182,18 @@ public void resume(final int cId) { TcpSocketClient client = getTcpClient(cId); client.resume(); } + + @SuppressWarnings("unused") + @ReactMethod + public void addListener(String eventName) { + // Keep: Required for RN built in Event Emitter Calls. + } + + @SuppressWarnings("unused") + @ReactMethod + public void removeListeners(Integer count) { + // Keep: Required for RN built in Event Emitter Calls. + } private void requestNetwork(final int transportType) throws InterruptedException { final NetworkRequest.Builder requestBuilder = new NetworkRequest.Builder();