I am using asmack library for my chat application.I am using below described code for getting messagecount:
ServiceDiscoveryManager manager = ServiceDiscoveryMan
Just checking, did you configure your smack providers?
Before establishing the connection, this should be called
SmackAndroid.init(mContext); // this loads extension providers into aSmack
try {
conn.connect();
} catch (XMPPException e) {
e.printStackTrace();
// do something
}
Without calling this, you will definitely get