No contacts
BeantwortetHi,
I have a little issue, sometime I get an emptylist with:
(RainbowSdk.instance().contacts().rainbowContacts).copyOfDataList
So I have to reconnect to Rainbow one or more time to get the list..
-
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
IItemListChangeListenerobject 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.
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
5 Kommentare