This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
HQL to get all the records in one table but in not other
Parsing a String
How To Start Own software company
request.getParameterValues not working
hibernate string search question