do Add Tel To Exist Contact via Intent - Android Intent

Android examples for Intent:Phone Call

Description

do Add Tel 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 doAddTelToExistContact(String telNumber) {
        Intent newIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT,
                Contacts.CONTENT_URI);
        newIntent.setType(Contacts.CONTENT_ITEM_TYPE);
        newIntent.putExtra(Intents.Insert.PHONE, telNumber);
        return newIntent;
    }/*from   w w w.j a va2 s . c  om*/
}

Related Tutorials