• Although this is not a part of the vCard standard, I think it would be very helpful if DavDroid could backup custom ringtone preferences in addition to the other contact information. (restoring the custom ringtones is one of the major annoyances when recovering the contact list from backup, or on a new device, when not using Google’s contacts.)

    I propose adding a new custom vcard property such as X-RINGTONE-URI that would be mapped to the CUSTOM_RINGTONE column in the contact database.

    I see two main problems with this feature:

    1. The URI might be device-specific (e.g., the location of the sdcard can be different on different devices, and the ringtone might not exist on some devices). This would cause problems if syncing multiple devices. I can think of several ways to handle this:
      a) add a device-type identifier to the ringtone property. This would let different devices have different ringtones, and would allow backup/restore to the same device type, but wouldn’t allow changing the ringtone for all devices in one place. This is easiest to implement.

    b) allow variable substitution (e.g., use something like %ringtone_sdcard_location% instead of the actual URI prefix, and add a GUI option to set the variable location for each device). This looks like it’s still fairly easy to implement in terms of the vcard management, but requires GUI additions that might be confusing (although it may be possible to automatically guess the variables, and “do the right thing” in most cases)

    c) some hybrid of the two options above (e.g., allow specific path prefixes to denote device-specific ringtones, while others would be treated using variable substitution).

    d) store the ringtone itself rather than a URI. This is problematic because ringtones can be quite large, and we probably don’t want to store the same ringtone multiple times. If we want to do de-duplication, this seems rather hard to implement (and needs a much more detailed design to deal with corner cases).

    1. changing the CUSTOM_RINGTONE on a raw contact has no effect except when the contact is first added – it should be changed on the aggregate contact. So it’s not entirely clear what should be done if there are conflicting ringtones in the raw contacts. however, it seems reasonable to just set the ringtone on the aggregate, which will have the effect of setting it for all the raw contacts.

    If you would consider merging this feature, I may be able to submit a patch.

  • What about only specifying the filename which would be looked up in an sdcard folder?

  • I have noticed that I am not able to set a custom ringtone at all when using DAVdroid 0.6.8 on CyanogenMod 11-2014-1008-SNAPSHOT-M11-hammerhead (Android 4.4.4) on a Google Nexus 4. I can set ringtones for phone-only, unsynced contacts; but not for DAVdroid contacts. I’m using ownCloud 7.0.3 on Debian Jessie. It sounds like DAVdroid does not attempt to backup custom ringtone selections, which would be a nice enhancement, but it should at least store the preference locally. It seems to me that interfering with the selection of a custom ringtone would be a bug, rather than a potential enhancement. Should I file a separate report for this?

  • developer

    @bluethegrappler No, I guess your problem is the same as in #323.

  • developer

    The ring tone is not contained in the raw contact. When setting an ring tone in the Contacts app, CUSTOM_RINGTONE of the RawContact is not set (it’s only set for the aggregated contact). See RawContacts docs:

    A custom ringtone associated with a raw contact. Typically this is the URI returned by an activity launched with the ACTION_RINGTONE_PICKER intent. To have an effect on the corresponding value of the aggregate contact, this field should be set at the time the raw contact is inserted. To set a custom ringtone on a contact, use the field Contacts.CUSTOM_RINGTONE instead.

    So I guess DAVdroid should not synchronize ring tones, as it only aims to synchronize raw contacts.

Similar topics