Conversations: Use xmpp-addr library from babbler project instead of own Jid

Created on 8 Dec 2017  路  13Comments  路  Source: iNPUTmice/Conversations

Refactor the entire code to use the xmpp-addr / Jid implementation from the babbler project instead of our own Jid class (which unfortunately seems to have some broken stringprep profiles)

All 13 comments

This depends on #2714 because the babbler library uses Java 8.

Apparently the library uses PRECIS which is not supported by ejabberd.

I would like to work on this issue. Shall I proceed?

I tried it.Unfortunately, Android does not seem to provide JAXB. >_<~

I don't think you need the entire babbler project. Just xmpp-addr. And that comes without the JAXB dependency.

So basically you are suggesting that just copy-paste the xmpp-addr from babbler into conversation and refactor according to it.... Am I right?

@iNPUTmice I just add xmpp-addr implementation 'rocks.xmpp:xmpp-addr:0.7.5'锛宮aybe it also need JAXB.

@XmlJavaTypeAdapter(JidAdapter.class)`
public final class Jid implements Comparable<Jid>, Serializable, CharSequence {
...
}
final class JidAdapter extends XmlAdapter<String, Jid> {
...
}

It seems that there is no good way, what am I doing wrong?

No i meant to just use the xmpp-addr library. I kinda checked it with 0.7.4 - maybe something has changed that doesn't allow us to use this anymore. In that case disregard this entire issue.

I switched to 0.7.4, but with the same result, I'm afraid I did something wrong. :(
@iNPUTmice

What error message are you getting and where?

Same as when I used 0.7.5

Warning:rocks.xmpp.addr.JidAdapter: can't find superclass or interface javax.xml.bind.annotation.adapters.XmlAdapter
Warning:rocks.xmpp.addr.Jid: can't find referenced class javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
Warning:rocks.xmpp.addr.JidAdapter: can't find referenced class javax.xml.bind.annotation.adapters.XmlAdapter
Warning:there were 5 unresolved references to classes or interfaces.

Oh that might just be proguard and can be ignored by editing proguard-rules.pro and add a -donwarn rock.xmpp.addr.* or something.

I tried to add -dontwarn rock.xmpp.addr.** but get the same message. I'm not sure but I guess Android
does not support interface javax.xml.bind.annotation.adapters.XmlAdapter , because it went wrong when I looking at the source

image

There is a branch from last year where i toyed around with this: https://github.com/siacs/Conversations/tree/xmpp_addr

At this time Conversations wasn't using proguard then.

however this issue is not super important. if it doesn't work it doesn't work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DoM1niC picture DoM1niC  路  4Comments

pravi picture pravi  路  4Comments

devurandom picture devurandom  路  3Comments

mightyBroccoli picture mightyBroccoli  路  3Comments

eyome picture eyome  路  3Comments