android - Cannot retrieve whatsapp contact's numbers -
this code getting whatsapp contacts can't getting contact numbers. code is: hatsapp it's "com.whatsapp". so:
cursor c = getcontentresolver().query( rawcontacts.content_uri, new string[] { rawcontacts.contact_id, rawcontacts.display_name_primary }, rawcontacts.account_type + "= ?", new string[] { "com.whatsapp" }, null); arraylist<string> mywhatsappcontacts = new arraylist<string>(); int contactnamecolumn = c.getcolumnindex(rawcontacts.display_name_primary); while (c.movetonext()) { mywhatsappcontacts.add(c.getstring(contactnamecolumn)); }
tried both contacts , contacts.data showing names . can me please?
Comments
Post a Comment