XMRig-for-Android / xmrig-for-android

⛏Mine Monero from your android device
MIT License
154 stars 35 forks source link

RN 0.65.0 require some new listener methods on the Native Module when call the NativeEventEmitter #14

Closed garrylachman closed 2 years ago

garrylachman commented 2 years ago

RN 0.65.0 require some new listener methods on the Native Module when call the NativeEventEmitter

This warning is shown because of the commit 114be1d, which checks if the Native Module has the methods: addListener and removeListeners. These checks are necessary because of this commit f5502fb, which tries to use the Native Module to notify subscriptions on Android. So I think this issue is only related to Android and the 0.65.0 release.

Doing some tests in another libraries with the old architecture I was able to fix it adding those methods in the Native Module in Java:

@ReactMethod
public void addListener(String eventName) {
  // Keep: Required for RN built in Event Emitter Calls.
}

@ReactMethod
public void removeListeners(Integer count) {
  // Keep: Required for RN built in Event Emitter Calls.
}

https://issueexplorer.com/issue/software-mansion/react-native-reanimated/2297

garrylachman commented 2 years ago

/cib

create-issue-branch[bot] commented 2 years ago

Branch issue-14-RN_0_65_0_require_some_new_listener_methods_on_the_Native_Module_when_call_the_NativeEventEmitter created!

github-actions[bot] commented 2 years ago

Branch already exists