Search in sources :

Example 1 with RCTDeviceEventEmitter

use of com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter in project react-native-navigation by wix.

the class EventEmitter method emit.

private void emit(String eventName, WritableMap data) {
    if (reactContext == null) {
        Log.e("RNN", "Could not send event " + eventName + ". React context is null!");
        return;
    }
    RCTDeviceEventEmitter emitter = reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class);
    emitter.emit(eventName, data);
}
Also used : DeviceEventManagerModule(com.facebook.react.modules.core.DeviceEventManagerModule) RCTDeviceEventEmitter(com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter)

Aggregations

DeviceEventManagerModule (com.facebook.react.modules.core.DeviceEventManagerModule)1 RCTDeviceEventEmitter (com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter)1