【问题标题】:Incomplete and random numbers of Friends list using asmack使用 asmack 的好友列表的不完整和随机数
【发布时间】:2014-12-19 07:40:38
【问题描述】:

我从 android 的 asmack 名册中获得随机数量的朋友。

我正在使用

        roster = connection.getRoster();
        Collection<RosterEntry> entries = roster.getEntries();
        return roster.getEntries();

请帮忙...

【问题讨论】:

    标签: android xmpp smack asmack


    【解决方案1】:

    我正在使用相同的方法来检索名册条目,而且我做得很完美。请检查您的代码一次。如果您需要任何帮助,请在此处评论。

    ArrayList<RosterEntry> rosterEntriesc;
        try{
                    connection = MyXMPPConnection.getXMPPConnection();
                    roster = connection.getRoster(); 
                    rosterEntriesc = new ArrayList<RosterEntry>(roster.getEntries());
           }
    catch(Exception e)
    {
    e.printStackTrace();
    }
    

    【讨论】:

    • 是的,这就是我的意思,这是正确的方法,但我仍然得到随机数的名册条目
    • 名册条目的随机数是什么意思?
    • 有时我有 1 或 2 个朋友,有时都是,有时没有
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-14
    • 2017-05-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多