1

we need to set custom ringtone to a specific contact and set it back to the default ring tone after some time . Problem is, that on some devices when we put null into database, this devices set ringtone to "unknown". (Device example: Nexus 4)

ContentValues values = new ContentValues();
values.putNull(ContactsContract.Contacts.CUSTOM_RINGTONE);
                    context.getContentResolver().update(Contacts.CONTENT_URI,
                            values, "_ID=?",
                            new String[] { String.valueOf(c.id) });

Is there any other way how to set default ringtone to contact?

cecan89
  • 245
  • 1
  • 2
  • 10
  • have a look at my answer to the question here: http://stackoverflow.com/questions/14230444/setting-contact-custom-ringtone-how?noredirect=1#comment26372785_14230444 – Bruno Bieri Aug 03 '13 at 09:26

1 Answers1

2

Ok, problem was elsewhere. It was used ringtone from assets and this cause "unknown ringtone" problem. Solved by copy ringtone in to device.

cecan89
  • 245
  • 1
  • 2
  • 10