Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Contact API in 1.6 in 2.2

 
Pratik Goswami
Ranch Hand
Posts: 136
Android Chrome Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?


Thanks
Pratik Goswami
 
James Elsey
Ranch Hand
Posts: 228
Android IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic