Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Contact Custom Fields

Tags:

android

Alright, I'm a little new to the Android SDK, so forgive me if my question doesn't make sense or is very trivial. I'd like to add a custom field for contacts, that contains the contacts username on a website I'm doing this app for. And, with this custom field, I'd like to have the ability to click it (like "Send message" or "Call mobile") so that I can go to a specif Activity in my application, with a TextView set with the username that I just clicked on.

Sorry if that is a bit confusing, if you need anything else let me know!

like image 638
Chiggins Avatar asked Jun 09 '10 20:06

Chiggins


People also ask

How do I customize constant contact?

Click in the block and place your cursor where you want to add the contact detail within the text. From the toolbar, click Insert > Contact Details. From the drop-down, select the contact detail or custom field you want to insert.


1 Answers

It's working! But I changed Data.CONTACT_ID to Data.RAW_CONTACT_ID here:

if (mod == 0) {
    values.put(Data.CONTACT_ID, this.getId());
    values.put(Data.MIMETYPE, clsContacts.FORMALITY_MIMETYPE);
    ctx.getContentResolver().insert(Data.CONTENT_URI, values);
}
like image 78
Natali Avatar answered Sep 19 '22 23:09

Natali