I am trying to save the contact details to the android contacts through my application. I do not want to have the default contact application to do this job, instead I need to do this from my code directly. Here is the code which I use. After the button onclick, I would require to have the contact detail stored to the cntact in android, which, unfortunately is not happening.
Can someone please guide me where I am going wrong in this code and what need to be done in order to resolve the issue.
Any help in this regard is well appreciated.
Regards, Rony
ContentValues values = new ContentValues();
values.put(Phone.NUMBER, "456456");
values.put(Phone.TYPE, Phone.TYPE_WORK);
Uri uri = getContentResolver().insert(Phone.CONTENT_URI, values);