do Add Email To Exist Contact via Intent - Android Intent

Android examples for Intent:Send Email

Description

do Add Email To Exist Contact via Intent

Demo Code


//package com.book2s;
import android.content.Intent;

import android.provider.Contacts.Intents;
import android.provider.ContactsContract.Contacts;

public class Main {

    public static Intent doAddEmailToExistContact(String email) {
        Intent newIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT,
                Contacts.CONTENT_URI);
        newIntent.setType(Contacts.CONTENT_ITEM_TYPE);
        newIntent.putExtra(Intents.Insert.EMAIL, email);
        return newIntent;
    }/*from   w w  w. jav  a2s .  com*/
}

Related Tutorials