I have had a chance to look at my code in the actual app. My code actually did include
So, here is what else I discovered...
Both of my friends that have HTC Rhymes get the error, and my brother in law who has an HTC One gets the error. The app is actually creating contacts, but the contacts are named 'unnamed', instead of ["AA" & DateTime.Now] and do not have any phone number info.
I did some more searching and found this:
http://stackoverflow.com/questions/10702489/contentresolver-query-is-throwing-a-nullpointerexception This information doesn't mean a lot to me, as I don't know Java, but it sounds like the ContentProvider/ContentResolver in HTC Sense is either bugged to not allow null values where they should be allowed, and that it can be fixed by passing non-null values instead (or something like that...?)
Maybe the ContactsUtils library is passing the ContentProvider/ContentResolver null values that it refuses to accept...? I guess I am just hoping that I am barking up the right tree, since I am not able to figure this one out on my own.
Thanks,
Eric
Oh, and Erel, do you have any devices that are running HTC Sense that you can try the ContactsUtils library with to see if you are able to use the InsertContact function?