This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Android and the fly likes Contact API in 1.6 in 2.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Contact API in 1.6 in 2.2" Watch "Contact API in 1.6 in 2.2" New topic

Contact API in 1.6 in 2.2

Pratik Goswami
Ranch Hand

Joined: Mar 02, 2009
Posts: 136

Hi All,

I am looking for the solution to get contact details (Phone, Email, Zip) from the device. I have implemented code for OS 1.6 as well as for 2.2. I am building an application with API level 4 (1.6), but when I run the build in 2.2 device I am getting email and phone string null.

CODE - for OS 1.6

CODE - for OS 2.2

Here is the code snippet I have found

Do anyone have suggestion how can I get contacts' information with help of this code snippet?

Pratik Goswami

iOS * Android Developer
James Elsey
Ranch Hand

Joined: Dec 21, 2007
Posts: 228

IIRC the "People" API is deprecated in 2.2 so you will need to use the ContactsContract provider

I did start to write up my findings on this but I need to review it/complete it, but my post might help you

Kind Regards, James. OCPJP 1.6 || My SCJP / OCJCP Study Notes
Interested in : SCJP, Google App Engine, Stripes, Android;|| My Bite-Size SCJP Study Blog
I agree. Here's the link:
subject: Contact API in 1.6 in 2.2
It's not a secret anymore!