Getting offline messages in android chat application with use of asmack library

前端 未结 6 1039
终归单人心
终归单人心 2021-02-11 04:12

I am using asmack library for my chat application.I am using below described code for getting messagecount:

ServiceDiscoveryManager manager = ServiceDiscoveryMan         


        
6条回答
  •  时光说笑
    2021-02-11 04:55

    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

提交回复
热议问题