How to show phone contacts in a ListView

后端 未结 2 1820
面向向阳花
面向向阳花 2020-12-18 12:45

Following is my code, actually on screen it\'s not showing me any contact. In emulator I have 5 contacts added. Please tell me what to do.

{
    //some code
         


        
2条回答
  •  眼角桃花
    2020-12-18 13:14

    First I would just narrow the problem.

    1) Check if you have permissions for reading contacts

    
    

    2) Check if cursor have any results

    cur.getCount()
    

提交回复
热议问题