Android Forums

Go Back   These FORUMS ARE DISABLED!! OUR NEW FORUMS ARE AT http://androidforum.com/ > Android Software > Android Games And Applications
Connect with Facebook

Click Here To Register!
 
 
LinkBack Thread Tools Display Modes
Old 09-22-2009, 05:43 AM   #1
Junior Member
 
Join Date: Sep 2009
Posts: 2
Friends: 0
View rishabh's Profile   View rishabh's Photo Album   View rishabh's Blog   View Social Groups
Hi to all,
I am new for android development. I am trying read and write contacts to android addressbook.
I tried following line of code for write name into android

public class SecondApp extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

ContentValues values = new ContentValues();
values.put(Contacts.People.NAME, "Rishabh");
ContentResolver cr = getContentResolver();
Uri uri = cr.insert(People.CONTENT_URI, values);

but i am getting "The application has stopped unexpectedly. Please try again" message.

what is wrong in it ?
How can i access contacts of android ?

Thanks in advance...
rishabh is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Space in front of contacts' name issue FutureMillennium Android Chat 0 07-07-2009 03:03 AM
Popular Contacts - Track your most talked to contacts leoromanovsky Android Games And Applications 0 06-15-2009 03:28 PM
Gps issue on HTC G1 highstandard G1 0 01-20-2009 11:49 PM
Android Developers Will Have Access to Less Than 80% of the Android Code Andor Android Development, Answers, Tutorials, and Code Snippets 1 11-22-2008 12:54 AM


Unlocked G1 Phones | Buy T-Mobile G1 | Google Phone

All times are GMT -6. The time now is 08:42 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright (c) 2012 TalkAndroid.com. All rights reserved.