This will help to get rid of repetitive class casts, and make
PacketCollector api more inline with itself (since some methods
are already generic return methods).
every SASL Mechanism is designed as a byte array based protocol. XMPP
adds the constraint that the challenges and responses are send base64
encoded. It's therefore better API design to let getAuthenticationText()
return byte[] instead of String.
This is a follow up on 6caf2cbdb5 where IQReplyFilter was changed so
that getUser() must not return null. But this is the case in
AccountManager where no resource binding has taken place and the user is
therefore not set.
The fix is the same as in 6caf2cbdb5, instead of IQReplyFilter we
simply use a PacketIDFilter.
to avoid
feature-not-implemented
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:182)
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:161)
at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.discoverItems(ServiceDiscoveryManager.java:573)
at org.jivesoftware.smackx.address.MultipleRecipientManager.getMultipleRecipienServiceAddress(MultipleRecipientManager.java:310)
at org.jivesoftware.smackx.address.MultipleRecipientManager.send$7a184d34(MultipleRecipientManager.java:82)
for e.g. Google Apps XMPP services.
This is not to be merged in master/4.1 branch as it already contains a
similar fix.
as the local username is only available after binding (and legacy
session establishment). This makes Smack compatible again with XMPP
services that use the user's JID as from attribute in the result IQ
after the bind set IQ, e.g. Facebook:
SENT:
<iq id='sqvTK-1' type='set'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>Smack</resource>
</bind>
</iq>
RCV:
<iq from='user.name.1@chat.facebook.com' id='sqvTK-1' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>user.name.1@chat.facebook.com/Smack</jid>
</bind>
</iq>
Fixes SMACK-590
Similar flaw was also fixed in 2c7f1efe80.
Also ensure that OfflineMessagesManager doesn't leak collector by using
a try/finally block.
Fixes SMACK-592
This commit marks an important milestone with the addition of the
smack-android subproject. Smack is now able to run native on Android
without requiring any modifications, which makes the aSmack build
environment obsolete.
It was necessary to redesign the code for SASL authentication to achieve
this. Smack now comes with smack-sasl-provided for SASL implementations
that do not rely on additional APIs like javax for platforms where those
APIs are not available like Android.