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

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -