How can I get primary email address of a contact

后端 未结 1 597
温柔的废话
温柔的废话 2021-01-16 13:57

HI,

I am able to get the contact cursor using the following:

Cursor cursor = context.getContentResolver().query(People.CONTENT_URI,
                n         


        
1条回答
  •  失恋的感觉
    2021-01-16 14:40

    This is untested, but perhaps something like this?

    Cursor cursor2 = context.getContentResolver().query(ContactMethods.CONTENT_EMAIL_URI, new String[] { ContactMethods.DATA }, "contact_methods._id=?", new String[] { emailID }, null);
    

    0 讨论(0)
提交回复
热议问题