0

I am following the answer on this post IPC in Android using GreenRobot eventbus about IPCEventBus.

public class Listener implements IIpcEventBusConnectionListener, IIpcEventBusObserver {

    public Listener() {
        IIpcEventBusConnector connector =
            ConnectorFactory.getInstance().buildConnector(context, this, "com.blueengine.login");
        connector.startConnection();
    }

    @Override
    public void onConnected(IIpcEventBusConnector connector) {
        connector.registerObserver(this);
    }

    @Override
    public void onEvent(IEventIpc event) {

    }

    @Override
    public void onDisconnected(IIpcEventBusConnector connector) {

    }
}

Then on my Login app

I want to send an event called UserLoggin. How do I do this?

public class UserLoggin implements IEventIpc
{
}
Community
  • 1
  • 1
Blue Nite
  • 128
  • 8

1 Answers1

3

When your event triggers post the event by calling this:

IpcEventBus.getInstance().postEvent(event);

As outlined in the documentation.

sam_c
  • 810
  • 7
  • 25