Top

No contacts

Answered

Comments

5 comments

  • Pascal BORSCHNECK

    Hi Alexandre.

    Someone from the SDK team will have a look.
    Do you know the SDK version you are using ?

    Best regards,

    Pascal

    0
    Comment actions Permalink
  • Pascal BORSCHNECK

    Hi Alexandre, creating a Zendesk ticket.

    0
    Comment actions Permalink
  • Alexandre Gay

    I'm using the Android SDK version 1.37.0

    0
    Comment actions Permalink
  • Jonathan PETIT

    Hi Alexandre,

     

    It is better for you to use the last version of android sdk which is "1.42.0". We do not support this version.

     

    But, I think, you will have the same problem with the new version.

     

    Please, could you try this? as explained in the documentation?

     

    To retrieve the list of your contacts (they are in your network), you can call the method getRainbowContacts() but you have to listen to the contacts list changes. See more in Guide ArrayItemList.

    You can do that by creating an IItemListChangeListener object in the class which is listening and then register.

    
        public class MyFragmentWhichIsListeningConversations extends Fragment {
            private IItemListChangeListener m_changeListener = new IItemListChangeListener() {
                @Override
                public void dataChanged() {
                    // Do something on the thread UI
                    ArrayItemList<IRainbowContact> contacts = RainbowSdk.instance().contacts().getRainbowContacts();
                }
            };
    
            @Override
            public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
                RainbowSdk.instance().contacts().getRainbowContacts().registerChangeListener(m_changeListener);
                return view;
            }
        
            @Override
            public void onDestroyView() {
                RainbowSdk().instance().contacts().getRainbowContacts().unregisterChangeListener(m_changeListener);
                super.onDestroyView();
            }
        }
    

    Indded, sdk need few times to retrieve all contacts, that why, it is mandatory to listen changes for the contacts list as explained above.
    1
    Comment actions Permalink
  • Alexandre Gay

    OK, thank you for your answer, I'm gonna try this way !

    0
    Comment actions Permalink

Please sign in to leave a comment.

  • Ask the Community

    Do you need help? Ask your questions to the Community and get answers from other Rainbow users.

    Post message