mirror of
https://github.com/status-im/react-native-firebase.git
synced 2026-09-01 22:51:09 +00:00
[messaging][android] Bit of tidy up of Android messaging; Update messaging event names to match iOS
This commit is contained in:
@@ -39,11 +39,11 @@ public class Utils {
|
||||
/**
|
||||
* send a JS event
|
||||
**/
|
||||
public static void sendEvent(final ReactContext context, final String eventName, final WritableMap params) {
|
||||
public static void sendEvent(final ReactContext context, final String eventName, Object body) {
|
||||
if (context != null) {
|
||||
context
|
||||
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
|
||||
.emit(eventName, params);
|
||||
.emit(eventName, body);
|
||||
} else {
|
||||
Log.d(TAG, "Missing context - cannot send event!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user