What is the best way to get distinct contacts in Android

后端 未结 4 1504
南旧
南旧 2020-12-17 02:34

I am successfully storing contacts in parse.com dashboard data browser by this code.

public void readContacts(){
         ContentResolver cr = getContentReso         


        
4条回答
  •  死守一世寂寞
    2020-12-17 02:51

    Set is a collection in java that does not allow duplicates. You can put your data into a set with number as a key and name as value, to avoid duplicate numbers.

    And later you can take them back from set and put into your testObject with name as key and number as value.

提交回复
热议问题