Android Question Question on GetEvents of ContactsUtils library

shaffnert03

Member
Licensed User
Longtime User
As per Erel's advice, resposting my question from http://www.b4x.com/android/forum/th...-the-stored-contacts.30824/page-3#post-208363 to here.

Trying to use the new getevents() function (thanks so much for adding that BTW!), and having some issues getting the information out. If I put the result into a cuEvents object I can get data out when it's populated, but if the contact has no event data I can't seem to check for that.

IsInitialized doesn't work since I had to initialize the variable before pulling it (didn't work if I tried not to), and if try to check and see if "EventType" is <> "" then the program bombs out. Log shows "Error occurred on line: 118 (contactsutils) importcontactsafterFirstLayout (java line: 98)"

As an alternative I tried to put the getevents result in a normal list. I could then put the items from that into an object, but nothing I put in the get function on the object seemed to get the data out.

Any help with this? Here's a few lines that I'm trying as a visual:

Code:
Dim EventList As cuEvent
EventList.Initialize
EventList = cu.GetEvents(Contact.Id)If EventList.EventType = "birthday"Then lbl2.Text = EventList.DateString
Also, more generally, this is like the third or fourth question I've had on just getting data out of various data types, is there somewhere particular you'd recommend I go for more information on this? I've got both user manuals and the Kindle book on B4A, anywhere in particular I should look to understand this better?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…