For XMPP server that supports “iq-register”, following stream:features/ is send during initial connection:
01-01 07:13:53.675 11086-26982/org.atalk.android D/SMACK: RECV (5): stream:featuresSCRAM-SHA-1PLAINX-OAUTH2</stream:fea tures>
However Smack AbstractXMPPConnection#parseFeatures method does not include a case to capture the stream feature as attached below:
/** ======================================================
protected final void parseFeatures(XmlPullParser parser) throws Exception {
streamFeatures.clear();
final int initialDepth = parser.getDepth();
while (true) {
int eventType = parser.next();
if (eventType == XmlPullParser.START_TAG && parser.getDepth() == initialDepth + 1) {
ExtensionElement streamFeature = null;
String name = parser.getName();
String namespace = parser.getNamespace();
switch (name) {
case StartTls.ELEMENT:
streamFeature = PacketParserUtils.parseStartTlsFeature(parser);
break;
case Mechanisms.ELEMENT:
streamFeature = new Mechanisms(PacketParserUtils.parseMechanisms(parser));
break;
case Bind.ELEMENT:
streamFeature = Bind.Feature.INSTANCE;
break;
case Session.ELEMENT:
streamFeature = PacketParserUtils.parseSessionFeature(parser);
break;
case Compress.Feature.ELEMENT:
streamFeature = PacketParserUtils.parseCompressionFeature(parser);
break;
default:
ExtensionElementProvider provider = ProviderManager.getStreamFeatureProvider(name, namespace);
if (provider != null) {
streamFeature = provider.parse(parser);
}
break;
}
if (streamFeature != null) {
addStreamFeature(streamFeature);
}
}
else if (eventType == XmlPullParser.END_TAG && parser.getDepth() == initialDepth) {
break;
}
}
==================================================== **/
Also the AccountManager#isSupported is checking against this feature using
public static final String ELEMENT = “query”;
public static final String NAMESPACE = “jabber:iq:register”;
//====================================================================
public boolean isSupported()
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
XMPPConnection connection = connection();
ExtensionElement extensionElement = connection.getFeature(Registration.ELEMENT, Registration.NAMESPACE);
if (extensionElement != null) {
return true;
}
return ServiceDiscoveryManager.getInstanceFor(connection).serverSupportsFeature(Registration.NAMESPACE);
}