Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.ContentUris; import android.net.Uri; import android.provider.ContactsContract; public class Main { public static Uri getContactUri(String contactId) { return ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, Long.parseLong(contactId)); } }