Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I have used following query/code to fetch sim contacts in android
Java
Cursor cursor = ContentResolver.query(callUri,null,"name LIKE 'AN'%",null, null);

but this is not working instead fetching whole contacts. So please reply with that what query I should use to fetch and what the cloumn_name to fetch contacts name.
Posted
Updated 30-May-12 2:31am
v2

1 solution

 
Share this answer
 
v2
Comments
Sandeep Mewara 31-May-12 1:41am    
Good suggestion. 5!
Maciej Los 31-May-12 1:50am    
Thank you, Sandeep ;)
VJ Reddy 31-May-12 2:59am    
Good suggestion. 5!
Maciej Los 31-May-12 3:14am    
Thank you, VJ ;)
ks ravi 31-May-12 3:11am    
thanks for the reply,i would like to tell you that if DISPLAY_NAME used,it will fetch PHONE contacts only not sim contacts.But i need sim contacts,please reply with an example

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900