Android get all contacts telephone number in ArrayList

后端 未结 6 1207
礼貌的吻别
礼貌的吻别 2020-12-02 20:40

I am trying to save all contacts telephone numbers in an ArrayList but I cant find a way how. Is there a way to get them instead of picking them one by one with ContactsCont

6条回答
  •  暖寄归人
    2020-12-02 21:26

    Try this also get all contacts.

    Cursor cursor = context.getContentResolver().query(Phone.CONTENT_URI, null , null , null,
                            "upper("+Phone.DISPLAY_NAME + ") ASC");
    

提交回复
热议问题