Can't update contact details in android using code

Posted by masterkapu on Stack Overflow See other posts from Stack Overflow or by masterkapu
Published on 2010-04-10T10:18:24Z Indexed on 2010/04/10 10:23 UTC
Read the original article Hit count: 347

Filed under:
|

I'm trying to update/change contact ringtone using this code:

ContentValues values = new ContentValues();
values.put(ContactsContract.Data.CUSTOM_RINGTONE, "D:/TempDownloads/BurpSounds/Alex.wav");

getContentResolver().update(ContactsContract.Contacts.CONTENT_URI, values , "DISPLAY_NAME = 'Ani'", null);

I get the message: " the application has stopped unexpectedly"

what is wrong with my code and how do I do it?

thanks

© Stack Overflow or respective owner

Related posts about android

Related posts about ringtone