aspose file tools*
The moose likes Android and the fly likes Get contacts by group name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Get contacts by group name" Watch "Get contacts by group name" New topic
Author

Get contacts by group name

Jake Ikedichi
Greenhorn

Joined: Jan 04, 2013
Posts: 1
Hello
I am working on an android project. Trying to select all contacts belonging to a specific group. So, I'll like to get all the contacts in a group called Work
Below is my select statement

String select = "((" + Contacts.DISPLAY_NAME + " NOTNULL) AND ("
+ Contacts.HAS_PHONE_NUMBER + "=1) AND ("
+ Contacts.DISPLAY_NAME + " != '' ))";

I am passing the above select statement to a CursorLoader object, which works fine for getting all contacts. But I will like to add another clause like "(" + Contacts.GROUP_NAME + "=Work)" for getting only the work group
Please help..Thanks in advance
 
 
subject: Get contacts by group name
 
Similar Threads
hibernate string search question
How To Start Own software company
HQL to get all the records in one table but in not other
Parsing a String
request.getParameterValues not working