Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Contacts API on Android


Maybe it's me, but it seems like the contacts API is still not working on Android. I have the latest Titanium Developer 1.2.1, latest SDK 1.4.2, Android API 2.2.

But this line in a file contacts.js causes an error

var customData = Titanium.Contacts.getAllPeople();

Message: TypeError: Cannot call method "getAllPeople" of undefined (app://views.contacts.js#1)

Any ideas?

— asked November 15th 2010 by Czar
  • android
  • api
  • contacts

2 Answers

  • Android contacts are now usable via the core API. You should also check the current Titanium.Contacts API docs as pretty much all properties of returned contacts are accounted for.

    Android cannot add/edit contacts via the core Titanium.Contacts API, but you can do it by using Android Intents. Check out the "Forging Titanium Episode 9: Android Intent Cookbook" screencast to see exactly how to do this.

    — answered October 5th 2011 by Tony Lukasavage
  • You have to use a Continuous Integration build. The shipping 1.4.2 is really just with a couple of fixes for iOS. More information is in the development blog about 1.4.2

    — answered November 15th 2010 by Don Thorp
    1 Comment
    • Des this solve the mentioned problem? Or did you just point out that I have a wrong SDK Version?

      Sorry, I am confused :-)

      — commented November 15th 2010 by Czar
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.