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:
- 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).
- 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.