@n8fr8 I just made some changes to the API. Beginning with 14013a7 one OmemoService can handle multiple OmemoManagers/Devices. That enables you to have multiple devices active on the same XMPPConnection (useful for eg. testing).
This results in a slightly different setup. First, the client has to take care of the deviceId, since the OmemoStore doesn't do that any longer (store it eg. in androids shared preferences). Second, OmemoManagers.getInstanceFor() now takes two arguments, first the Connection and second the id of either an existing device, or null if you want to create a new device.
In short, you should have the following composition now:
- One OmemoService object per used OMEMO implementation (typically one SignalOmemoService).
- One OmemoManager per device (now you can use multiple devices per account).
- One OmemoStore per OmemoManager.
- Each OmemoManager has a reference to the used OmemoService (in theory you could in the future have eg. 2 OmemoManagers, one using a SignalOmemoService, and one using a Olm/XYZOmemoService at the same time!)
I hope, I did not miss anything important. I also updated the documentation. If you have any questions, don't hesitate to ask :)
Since the API is likely undergoing some more changes until it is merged, I'll leave this one open for now to document the development :)