Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package org.anddev.contacttest; import android.app.Activity; import android.content.ContentValues; import android.net.Uri; import android.os.Bundle; import android.provider.Contacts; public class ContactTest extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); addSampleContact(); } public void addSampleContact() { /* The first thing we need to do is, to create the values for contact we * want to insert. */ ContentValues valuesOfNewContact = new ContentValues(); valuesOfNewContact.put(Contacts.People.NAME, "John Doe"); valuesOfNewContact.put(Contacts.People.COMPANY, "Funky Company"); valuesOfNewContact.put(Contacts.People.NOTES, "Average Person"); /* Actually inserting the contact to the system-contacts goes like this. */ Uri newContact = getContentResolver().insert( Contacts.People.CONTENT_URI, valuesOfNewContact); /* To check whether the insertion was successful, we simply check if the * Uri returned is null or not. */ if (newContact != null) { /* Reaching here the Uri is != null and looks similar to this one: * content://contacts/people/1 */ /* Now lets add some more information to the contact we just created: a * Phone-Number. */ ContentValues phoneValues = new ContentValues(); phoneValues.put(Contacts.Phones.PERSON_ID, newContact.getLastPathSegment()); phoneValues.put(Contacts.Phones.NUMBER, "(888) 555-1212"); /* Insert it into the contacts-phones table. */ Uri phoneUpdate = getContentResolver().insert( Contacts.Phones.CONTENT_URI, phoneValues); /* Now lets finally add a email address, by creating another * ContentValues-Object. */ ContentValues emailValues = new ContentValues(); /* Extract the ID of the new Contact. The ID is the very last path of * the Uri that was returned above: content://contacts/people/1 */ String newContactID = newContact.getLastPathSegment(); emailValues.put( Contacts.ContactMethods.PERSON_ID, newContactID); emailValues.put( Contacts.ContactMethods.KIND, Contacts.ContactMethods.EMAIL_KIND); emailValues.put( Contacts.ContactMethods.TYPE, Contacts.ContactMethods.EMAIL_KIND_HOME_TYPE); emailValues.put( Contacts.ContactMethods.DATA, "john_doe_homemail@anddev.org"); /* * The difference here is that when you insert something into * email-table into the Contacts, be sure to use the path for the * person that was returned originally, and then append the path to the * ContactMethods "contact_methods" to the end of this Uri. */ String appendix = Contacts.ContactMethods.CONTENT_URI.getPath(); Uri emailTargetUri = newContact.buildUpon().appendPath(appendix).build(); Uri emailUpdate = getContentResolver().insert( emailTargetUri, emailValues); } } }