Continue testing with the OmemoManager#deviceListUpdateListener() after the reflection private method implementation. In smack omemo deviceListUpdateListener() handling upon receipt of an deviceList stanza, it will perform
mergeCachedDeviceList(OmemoManager.this, from, omemoDeviceListElement);
in which it will update the “activeDevices” and “inactiveDevices” list with the received omemoDevice ID’s; in the persistent storage. The update does not checked for any new deviceID nor make new entry in the entities table if any. Under the smack omemo default file based backend storage, this works fine as the actual entities information can be added at a later stage (not sure when and how smack omemo update the entities info - guess it is during olmMessage sending?).
aTalk however implements omemo persistent storage using SQLite database, update the device active state without any entry in the entities will fail. If needs to, aTalk can perform check in the below override method and create new/missing entry in the entities table while updating its active state.
storeCachedDeviceList(OmemoManager omemoManager, BareJid contact, CachedDeviceList deviceList)
Would smack omemo considers enhance the deviceListUpdateListener() method to take care the above scenario i.e. create new identities entry if missing before calling active state update.
Any other better recommendations?
========== aTalk log ======================
07-24 08:22:40.555 D/SMACK: RECV (0): 11creation@001500:736494:893196creation@001500:736494:893 196
07-24 08:22:40.555 W/αTalk:  org.atalk.persistance.DatabaseBackend.storeCachedDeviceList().1314 Identities table contains no device: email@example.com:816614937