do Add Tel Contact via Intent - Android Intent

Android examples for Intent:Phone Call

Description

do Add Tel 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 doAddTelContact(String telNumber) {
        Intent newIntent = new Intent(Intent.ACTION_INSERT,
                Contacts.CONTENT_URI);
        newIntent.putExtra(Intents.Insert.PHONE, telNumber);
        return newIntent;
    }//  w w w .ja v  a  2s .  c  o  m
}

Related Tutorials