【问题标题】:How to connect to other process using IPCEventBus如何使用 IPCEventBus 连接到其他进程
【发布时间】:2016-09-14 03:01:04
【问题描述】:

我正在我的应用程序中发送一个名为 event 的对象,但发送到另一个进程。

我正在使用IPC EventBus。当我注册时,我无法接收回事件。

这就是我正在做的:

public class UserActivity extends Activity 
    implements IIpcEventBusConnectionListener, IIpcEventBusObserver {

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

    ...
}

如何接收事件?

【问题讨论】:

    标签: java android ipc


    【解决方案1】:

    你打电话给conn.startConnection();?如果你不这样做,它就不会起作用。

    IIpcEventBusConnector conn =
            ConnectorFactory.getInstance().buildConnector(context, this, "com.myapp");
    
    conn.startConnection(); 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-03-27
      • 2012-01-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多