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

java - unable show chart in xls document using jasper reports -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -

javascript - How to change image src on success AJAX -