Android Contacts API - Contacts.createPerson() - not able to create Person - NoSuchMethodException: PersonProxy
Hi,
I am using the latest CI Build 1.4.3 (as on 22.11.2010) with Android SDK 2.1 (also tested with 2.2).
I am trying to rebuild only the Contacts part KitchenSink demo.
When I click the add contact button, then i get the following error.
(I think somehow Titanium could not create a new person with this code var contact = Titanium.Contacts.createPerson())
Complete Stack Trace is here (http://pastie.org/1318539)
[TRACE] D/TiCommonContactsApi( 237):
(kroll$5) [73,259158] Using newer contacts api. Android SDK level: 7
[TRACE] E/TiModule( 237):
(kroll$5) [89,259247]
Error creating proxy
ti.modules.titanium.contacts.PersonProxy: PersonProxy(TiContext,Object[])
[TRACE] E/TiModule( 237):
java.lang.NoSuchMethodException: PersonProxy(TiContext,Object[])
[TRACE] E/TiModule( 237): at java.lang.Class.getMatchingConstructor(Class.java:674)
[TRACE] E/TiModule( 237): at java.lang.Class.getConstructor(Class.java:486)
[TRACE] E/TiModule( 237): at org.appcelerator.titanium.TiModule.createProxy(TiModule.java:100)
Any help is much appreciated.
Thanks in advance.
1 Answer
-
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.