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!
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.
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);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With