View RSS Feed

My Java Tips

Fetching contact field (PIM)

Rating: 2 votes, 5.00 average.
by , 11-06-2011 at 07:07 PM (4073 Views)
Each contact entry in a PIM Contact database is represented by Contact. This post is all about retrieving contact fields from PIM.


The supported field list for a Contact depends on vCard specification from the Internet Mail Consortium. These set of fields included in this Contact class provides relevant information about a contact. ContactList restricts what fields a Contact can retain. This reflects that some native Contact databases do not support all o the fields available in a Contact item. Time for an example:

Java Code:
// fetching DOB
if (contactList.isSupportedField(Contact.BIRTHDAY))
{
System.out.println("BirthDay: " +
contact.getDate(Contact.BIRTHDAY,0));
}
else
{
System.out.println(“DOB is not supported.”);
}

Submit "Fetching contact field (PIM)" to Facebook Submit "Fetching contact field (PIM)" to Digg Submit "Fetching contact field (PIM)" to del.icio.us Submit "Fetching contact field (PIM)" to StumbleUpon Submit "Fetching contact field (PIM)" to Google

Tags: None Add / Edit Tags
Categories
Java ME

Comments