Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b52ba14

Browse files
lubomyrlyubomyr
and
lyubomyr
authored
fixed warnings 'new NativeEventEmitter() was called with a non-null argument without the required addListener and removeListener methods' on react-native 0.65 and android platform (zmxv#740)
Co-authored-by: lyubomyr <lubomyr31@gmailc.om>
1 parent 62c90fb commit b52ba14

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎android/src/main/java/com/zmxv/RNSound/RNSoundModule.java‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ protected MediaPlayer createMediaPlayer(final String fileName) {
204204
}
205205
return mediaPlayer;
206206
}
207-
207+
208208
return null;
209209
}
210210

@@ -320,7 +320,7 @@ public void release(final Double key) {
320320
}
321321
}
322322
}
323-
323+
324324
@Override
325325
public void onCatalystInstanceDestroy() {
326326
java.util.Iterator it = this.playerPool.entrySet().iterator();
@@ -472,4 +472,14 @@ public Map<String, Object> getConstants() {
472472
constants.put("IsAndroid", true);
473473
return constants;
474474
}
475+
476+
@ReactMethod
477+
public void addListener(String eventName) {
478+
// Keep: Required for RN built in Event Emitter Calls.
479+
}
480+
481+
@ReactMethod
482+
public void removeListeners(Integer count) {
483+
// Keep: Required for RN built in Event Emitter Calls.
484+
}
475485
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /