Created
October 22, 2010 05:11
-
-
Save skatldjs/639982 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.provider.Contacts.People; | |
import android.content.ContentResolver; | |
import android.content.ContentValues; | |
ContentValues values = new ContentValues(); | |
// Add Abraham Lincoln to contacts and make him a favorite. | |
values.put(People.NAME, "Abraham Lincoln"); | |
// 1 = the new contact is added to favorites | |
// 0 = the new contact is not added to favorites | |
values.put(People.STARRED, 1); | |
Uri uri = getContentResolver().insert(People.CONTENT_URI, values); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment