4.1 alpha4 issues and questions

I started using 4.1 alpha4 and facing few issues

I am using this code

AndroidSmackInitializer androidSmackInitializer = new AndroidSmackInitializer();

androidSmackInitializer.initialize();

SmackTcpSmackInitalizer smackTcpSmackInitalizer = new SmackTcpSmackInitalizer();

smackTcpSmackInitalizer.initialize();

ExtensionsInitializer extensionsInitializer= new ExtensionsInitializer();

extensionsInitializer.initialize();

instead of SmackAndroid.init(getApplicationContext());

Later i do

xmpptcpConnection.setUseStreamManagement(true);

xmpptcpConnection.setUseStreamManagementResumption(true);

xmpptcpConnection.connect();

But still when i run

FileLog.b(log_tag, xmpptcpConnection.isSmEnabled());

FileLog.b(log_tag, xmpptcpConnection.isSmAvailable());

FileLog.b(log_tag, xmpptcpConnection.isSmResumptionPossible());

FileLog.b(log_tag, xmpptcpConnection.isDisconnectedButSmResumptionPossible()

i get all of them False on all the above steps any ideas on that ?I did enable the stream manangement on my ejabberd server.

``
**setReconnectionAllowed**(boolean isAllowed) is not available anymore or i am looking at something wrong ?

how do we handle reconnection in 4.1

What is roster Store ?

How do i bulild the 4.1 from sources for android ?

Thanks

Jeet

I am using this code

instead of SmackAndroid.init(getApplicationContext());

You should not do that manually. There was a bug in a recent alpha that prevented SmackTcpSmackInitializer from being run, but is no fixed in the latest alpha5-SNAPSHOT.

**[setReconnectionAllowed](http://www.igniterealtime.org/builds/smack/docs/latest/javadoc/org/jivesoftware/smack/ConnectionConfiguration.html#setReconnectionAllowed%28boolean%29)**(boolean isAllowed) is not available anymore or i am looking at something wrong ?

how do we handle reconnection in 4.1

Via the ReconnectionManager

What is roster Store ?
See RFC 6121 2.6

How do i bulild the 4.1 from sources for android ?
gradle assemble

Thanks flow .

If its not fixed yet is there any work around that i can use until you plan it in next alpha ?

Also for building it from the sources I tried to get more info about but could not find much of the success

for 4.0 i used to clone the github and then modify the sources and build it using the build script.

for 4.1 how do i get the sources and build it using gradle as a separate project ? , your help is greatly appreciated.

Hello @Flow I am using Alpha-5 now for checking SM

I do

xmpptcpConnection.setUseStreamManagement(true);

xmpptcpConnection.setUseStreamManagementResumption(true);

xmpptcpConnection.connect();

But still when i run

FileLog.b(log_tag, xmpptcpConnection.isSmEnabled());

FileLog.b(log_tag, xmpptcpConnection.isSmAvailable());

FileLog.b(log_tag, xmpptcpConnection.isSmResumptionPossible());

FileLog.b(log_tag, xmpptcpConnection.isDisconnectedButSmResumptionPossible()

I am getting false in latest alpha-5 too.

Am i doing something wrong or its not fixed yet ?? any ideas when it will be fixed ?

Set SmackConfiguration.DEBUG to true and show us a trace of the exchanged stream elements between client and server.

Before i do that … SM will be enabled only once I successfully sign on? or after connect ? Looks like i see SM namespace after i login.

Quoting XEP-198 2.:

Note: The client cannot negotiate stream management until it has authenticated with the server and has bound a resource; see below for specific restrictions.

Thank you Sir all makes sense now.