Reputation: 118
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
{
}
Upvotes: 0
Views: 298
Reputation: 810
When your event triggers post the event by calling this:
IpcEventBus.getInstance().postEvent(event);
As outlined in the documentation.
Upvotes: 3