Contacts API on Android
Hi,
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?
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.
-
You have to use a Continuous Integration build. The shipping 1.4.2 is really just 1.4.1.1 with a couple of fixes for iOS. More information is in the development blog about 1.4.2