sPFFramework/src/main/java/it/polimi/spf/framework/SPFContext.java
public void broadcastEvent(final int code, final Bundle payload) {
        if (SPFConfig.DEBUG) {
            Log.d(TAG, "Broadcasting event " + code + " with payload " + payload);
        }

        for (final OnEventListener listener : mEventListeners) {//TODO is it thread safe?
            mHandler.post(new Runnable() {

                @Override
                public void run() {
                    listener.onEvent(code, payload);
                }
            });
        }
    }
public void broadcastEvent(final int code, final Bundle payload) {
        if (SPFConfig.DEBUG) {
            Log.d(TAG, "Broadcasting event " + code + " with payload " + payload);
        }

        for (final OnEventListener listener : mEventListeners) {//TODO is it thread safe?
            mHandler.post(new Runnable() {

                @Override
                public void run() {
                    listener.onEvent(code, payload);
                }
            });
        }
    }
public void broadcastEvent ( final int code , final Bundle payload ) { if ( SPFConfig . DEBUG ) { Log . d ( TAG , "Broadcasting event " + code + " with payload " + payload ) ; } for ( final OnEventListener listener : mEventListeners ) { //TODO is it thread safe? mHandler . post ( new Runnable ( ) { @ Override public void run ( ) { listener . onEvent ( code , payload ) ; } } ) ; } }
Broadcasts an event to all registered listeners. Each listener will
receive a reference to the given bundle.

@param code    - the event code
@param payload - the event payload
Broadcasts an event to all registered listeners . Each listener will receive a reference to the given bundle .