androidandroid-syncadapterottogreenrobot-eventbus

Otto/EventBus across multiple processes


Is it possible to post event in one process (for example inside SyncAdapter which has android:process=":sync" manifest attribute) and receive it in another (inside regular app UI) with Otto or EventBus?

I know that Intent and BroadcastReceiver work just fine for communication across multiple processes but I would like to have simplicity and flexibility with Otto/EventBus.


Solution

  • No, that is not possible, as Otto, greenrobot's EventBus, and LocalBroadcastManager are all in-process solutions.

    You might consider simply removing the android:process attribute from the manifest, so it all runs in one process.