When picking out contact details, is there a built in domain class they can be mapped to? Or, do you have to create your own?
For example I do the following :
ContentResolver cr = getContentResolver();
Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,
null, null, null, null);
String s = null;
if (cursor.getCount() > 0)
{
while (cursor.moveToNext())
{
s = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
}
}
With s
, can I put that into a "contact" object/domain class, perhaps something like :
Contact myContact = new Contact();
myContact.setName(s);