This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Get contacts by group name
 
Similar Threads
hibernate string search question
HQL to get all the records in one table but in not other
request.getParameterValues not working
Parsing a String
How To Start Own software company