package com.sogilis.ReactNativeBluetooth.events;

public class EventNames {
    private static final String BASE = EventNames.class.getCanonicalName() + ".EVENT_";

    public static final String STATE_CHANGED = BASE + "STATE_CHANGED";
    public static final String SCAN_STARTED = BASE + "SCAN_STARTED";
    public static final String SCAN_STOPPED = BASE + "SCAN_STOPPED";
    public static final String DEVICE_DISCOVERED = BASE + "DEVICE_DISCOVERED";
    public static final String DEVICE_CONNECTED = BASE + "DEVICE_CONNECTED";
    public static final String DEVICE_DISCONNECTED = BASE + "DEVICE_DISCONNECTED";
    public static final String SERVICE_DISCOVERY_STARTED = BASE + "SERVICE_DISCOVERY_STARTED";
    public static final String SERVICE_DISCOVERED = BASE + "SERVICE_DISCOVERED";
}

package com.sogilis.ReactNativeBluetooth.events;

public class EventNames {
    public static final String STATE_CHANGED = name("STATE_CHANGED");
    public static final String SCAN_STARTED = name("SCAN_STARTED");
    public static final String SCAN_STOPPED = name("SCAN_STOPPED");
    public static final String DEVICE_DISCOVERED = name("DEVICE_DISCOVERED");
    public static final String DEVICE_CONNECTED = name("DEVICE_CONNECTED");
    public static final String DEVICE_DISCONNECTED = name("DEVICE_DISCONNECTED");
    public static final String SERVICE_DISCOVERY_STARTED = name("SERVICE_DISCOVERY_STARTED");
    public static final String SERVICE_DISCOVERED = name("SERVICE_DISCOVERED");

    private static final String name(String customNamePart) {
        return EventNames.class.getCanonicalName() + "." + customNamePart;
    }
}

Make event naming more flexible
android: Make event naming more flexible
