[messaging][android] Bit of tidy up of Android messaging; Update messaging event names to match iOS

This commit is contained in:
Chris Bianca
2017-05-30 09:52:04 +01:00
parent abc4de2257
commit 0a645c2261
6 changed files with 48 additions and 51 deletions
@@ -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!");
}