package com.sogilis.ReactNativeBluetooth.events;

import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattService;
import android.util.Base64;
import android.util.Log;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.bridge.WritableNativeMap;
import com.facebook.react.modules.core.DeviceEventManagerModule;
import static com.sogilis.ReactNativeBluetooth.Constants.MODULE_NAME;

public class EventEmitter {
    private final ReactApplicationContext reactContext;

    public EventEmitter(ReactApplicationContext reactContext) {
        this.reactContext = reactContext;
    }

    public void emitEvent(BluetoothEvent event) {
        logEvent(event);
        reactContext.
                getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).
                emit(event.getName(), event.getData());
    }

    private void logEvent(BluetoothEvent event) {
        if (event.isError()) {
            Log.e(MODULE_NAME, event.toString());
        } else {
            Log.d(MODULE_NAME, event.toString());
        }
    }

    public void emit(BluetoothEvent event) {
        emitEvent(event);
    }

    public void emitError(String eventName, String errorMessage) {
        emitEvent(EventBuilder.error(eventName, errorMessage));
    }
}

@@ -796,21 +796,16 @@
 oid emit
-Event
 (Bluetoo
@@ -832,21 +832,16 @@
      log
-Event
 (event);
@@ -1029,21 +1029,16 @@
 void log
-Event
 (Bluetoo
@@ -1223,86 +1223,8 @@
  %7D%0A%0A
-    public void emit(BluetoothEvent event) %7B%0A        emitEvent(event);%0A    %7D%0A%0A
     
@@ -1282,24 +1282,24 @@
 rMessage) %7B%0A
+
         emit
@@ -1298,21 +1298,16 @@
     emit
-Event
 (EventBu

Remove useless alias